LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   FOSS Games that could use AI (https://www.linuxquestions.org/questions/programming-9/foss-games-that-could-use-ai-4175448314/)

alsaf 02-02-2013 04:42 AM

FOSS Games that could use AI
 
I've got an idea for a library that implements simple behaviour-based Artificial Intelligence. It's only at the idea stage and I've managed to work on some of the finer details of it and, at the moment, I can't see there being any problem using it with either software or hardware based systems.

I'm being realistic and I realise, due to other commitments in my life, that I will have little time to write the library and will find it hard to create something that I could use to test this library. I think the best solution is to use a pre-existing game that could use AI, for instance board games like chess. Most games already have an element of AI and it means having to go through the code and taking that out. I was wondering, is there any games that would be easy to rewrite or could could be used with the library that I am looking to create?

The only other alternative I could think is is that I create a 'client' for the library to use as localhost when playing a network game. I'm not sure if that is possible?

As the language of the game, I would prefer if it was written in Python.

kbp 02-03-2013 04:45 PM

I'm not sure about the ease of removing/replacing the existing AI, but Armagetron Advanced could be a nice entry level game due to its simplicity - just collision detection/avoidance.

alsaf 02-05-2013 02:06 PM

thanks kbp.

As I mentioned, I don't really have much time to spend on this and frankly during the week after coming in from work I find it hard to wind down and can't really be bothered so it's only at the weekend that I can get time to look at it and when I get a 'brainstorm', I just try to get as much done as possible which sometimes putting the cart in front of the horse where I haven't even started the program yet but I'm thinking about how to test it in a real life situation!!

Given it some more thought, it isn't going to be a library but a standalone program, like an interpreter, that takes high level instruction from another program, breaks them down into lower level instructions or 'actions' that is used by another program via rules or as I like to call them skills. In the game you citied, an input and output interface would have to be created to communicate with the game and could act like a network bot. I'm trying to write the program using my understanding of Unix philosophy principles which is the reasoning for this and I intend it modularise it as much as possible into smaller programs that do one thing good. There is of course fold knowledge into data where these rules/skills and actions are stored in databases (I also hope to come up with simple learning where a new version of rules/skills is created using a series of problem solving i.e. says the AI program is used for a robot and it encounters a light switch, it has rules/skills for traditional light switches, dimmers, push etc but what if it comes against a different version of a switch? It tries a number of actions in order to try and operate it, if successful create new version or rule else go back to human operator which is very much like us humans when we encounter a technical problem we can't solve and goto somebody with more experience for assistance).

In theory, the same thing could be done with robotic automation, system administration and even chat bots with natural language. Whether this will happen in practise in another thing but it is a scratch I have been wanting to itch for a while and if it doesn't work, at least I knew that I have tried!

kbp 02-06-2013 01:57 AM

I looked at expert systems a long time back, the problem is that they're usually tied to a specific problem domain and that they need to be trained with test data. Is this what you're thinking of?

dugan 02-06-2013 11:28 AM

Quake could always use more bots...

alsaf 02-06-2013 02:07 PM

Quote:

Originally Posted by kbp (Post 4885294)
I looked at expert systems a long time back, the problem is that they're usually tied to a specific problem domain and that they need to be trained with test data. Is this what you're thinking of?

This is exactly what I am thinking about.

My original intention was to try and use as little code as possible. All the work would be done using the interpreted data and external programs much like sed is used on the command line used in a pipe to translate data from one program to another. In theory, the AI should be easy to code but the implementation on how it takes high level instructions from the start, breaks them into rules and with these rules create the low level instructions will be the hard part.

To take an example of a robot that is told to walk across the room:

High level command : Walk to box

Rules: locate box, move to box. These are the two simple commands but there will be conditional rules where robot has to deal with obstacles and possibly locate a light source if lighting is not good enough to see (this may involve physically finding a light switch or maybe remotely turning the light source on).

Low level commands: programs that control the various parts of the robot ie movement, GPS, sensors etc.

Of course, rules and the high level commands will need to be created to allow the robot to do basic functioning but maybe if functionality for self learning could be created, more versions of the basic rules could be created to deal with situations that don't work this basic rules?

This all sounds good in theory but will it work in practice? Maybe it could only work for simple applications like game bots that have limited functions to do and where data would be analysed i.e. the bots actions in game is stored and modified rules could be created from them?

kbp 02-06-2013 06:10 PM

Maybe start with a targeted expert system so you have a working base then try to expand it

alsaf 02-07-2013 01:00 PM

Quote:

Originally Posted by kbp (Post 4885881)
Maybe start with a targeted expert system so you have a working base then try to expand it

I've been looking at this from a point of view of using logic as the basis of AI. While this should be sufficient for the actual operation of AI, will it be enough for self-learning? It sounds similar to left and right brain hemispheres, the left being logical and analytical, the right intuitive and creative. The question is who do you program for example institution and creativity? As you say, start small.

kbp 02-07-2013 05:01 PM

I don't think it's enough for self-learning, a system that can learn will require guidance the same as humans do. We learn by mimicking others to start, then also by experience once we start to gain mobility and spacial awareness. Just because we have a framework to process situations doesn't mean we'll make good decisions, we still need parents and teachers to provide guidance (hurting small animals is bad .. etc).

In the same way, an expert system / AI will need some guidance until it reaches a satisfactory capability level - pure logic won't be enough to take it from infant to adult IMHO.

alsaf 02-10-2013 04:07 AM

Quote:

Originally Posted by kbp (Post 4886569)

In the same way, an expert system / AI will need some guidance until it reaches a satisfactory capability level - pure logic won't be enough to take it from infant to adult IMHO.

There is no doubt that the expert system/AI will need guidance but it has to be as little as possible in order to make it useful in the real world and to cut down in human error which will inevitably creep in. Och well, that's something that only to be needing to worry about down the line.


All times are GMT -5. The time now is 11:24 PM.