Helpful Information
 
 
Category: Game Development
Game developing -- AI

Hi All,
I am a newbie in this forum and thanks to all that browse this post.....
In my situation, I want to program a PC game, which is a single player game like "King Of Fighter"
the graphic is not a problem, however I meet a problem on AI.
I am not familiar in AI program.....
But to improve my game..... I need to develop a evolution AI in my game and an AI that can make decision in different situations....
So, I want to ask about which language to develop AI is the best?
I am quite familiar in C and java.....
but not familiar in AI <--which I really want to learn more....
all so my game is no need to installation....
graphic is completed, game rules and calculation is nearly completed but the "computer player" have not yet developed

thank you everyone in this thread and look forward for your reply~

Hi,

welcome to Devshed.

firstly, have a look at the sticky (http://forums.devshed.com/game-development-141/game-development-resources-361509.html) at the top of this forum, it contains links to some AI resources on the Internet & some links to some books on AI you may consider buying (I'm sure some of them have example chapters for you to look at).

Most of the example AI code I have seen has been in C/C++, so you may want to go that way. What language is the rest of it written in?

Displeaser

I never played that game, so i can't tell you more. If you wanna most advanced AI, try to learn neural networks. If your math is not perfect, it will be hard.

programing ai's is a pain in the a$$. my advice would be to map out all the possible situations and the reactions the player would take before you start coding anything. If you have a clear picture of all the options it's a lot easier to code.

I just want to develop a single player mode in my game...
actually the requirement on the AI is know how to "learn"...
Evolution AI is most difficult part in my development...I think...
Since I am not familiar to AI, why maths is important in AI??

why maths is important in AI??
Because most (if not all) methods of AI are heavily based on maths. Have a look at this article (http://en.wikipedia.org/wiki/Artificial_intelligence), it goes into a little detail about all the common methods.

If I was doing a "learning AI" I would look at Neural Networks (http://en.wikipedia.org/wiki/Neural_network)

Hope this helps.
Displeaser

Consider having your AI be static (i.e. hard coded). Evolving AI is extremely tricky.

A neural network as mentioned might be one possible solution. A neural network effectively approximates the best solution. For example, if you hard coded multiple strategies into the AI, from repeatedly playing against humans, it could learn to use the most effective one. The bonus is that by tweaking the weights to the different strategies, you can make the AI harder or weaker (exploit the best tactic more or less).

There's more AI techniques that can be used. "Evolving AI" comes into genetic programming/genetic algorithms. I don't recommend you go down this path. Try making a simple GA and you'll understand the issues at hand.

There's also other points to consider in AI. I recommend you focus on getting a polished game before breaking your head on the computer player.

THANK YOU EVERYONE~~
but one more question
is C programme good for AI programming??
or any other program easier to handle?

Just one thing, steve.
It's not proper to call C program. C is programming language :p

It's very good for AI. It's fast, supports various optimizations (asm, binary).

Here's some tutorials for Game AI

GameDev.net - Artificial Intelligence (http://www.gamedev.net/reference/list.asp?categoryid=18)

As pumpkin said earlier, AI is a pain in the A$$ to program, start it easy, program a couple of responses for your computer ai (ie if head punch, ai tries block head punch, with a random variable skewded to the ai's skill). once you get more familiar with interacting AI & code characters then think about doing fancy things(get the basics right first). Keep it simple to start (even just for the first version), and then make it better. AI is complex and a b1tch to code well (sorry anyone that may be offened :o ). If you have problems with code, post them here, I'm sure someone would be glad to help.

Displeaser

but one more question
is C programme good for AI programming??
or any other program easier to handle?

You need to consider how processor intensive these algorithms will get. GA/GP for example, benefits from high performance, since you can use a larger gene pool. A tic tac toe neural network doesn't really have the same problem. If you browse the net, you might find references to LISP, which used to be a popular choice for AI, but that was for semantical reasons.

So which is the best language? C/C++ is a great language if you need performance AI apps. If extreme performance isn't a goal, any modern language is fine. There's really no difference in choosing a language, because as everyone else is trying to tell you, the trouble with AI isn't the computer language, but figuring out the mathematical algorithm.

I saw some program such as prolog or LISP is used for AI programme....
what is advantage on using prolog or LISP?

I saw some program such as prolog or LISP is used for AI programme....
what is advantage on using prolog or LISP?

Taken from wikipedia: "It is an attempt to make a programming language that enables the expression of logic instead of carefully specified instructions on the computer." I never really got into LISP so this isn't my field of expertise. Other people with LISP experience, feel free to chip in.

Do take some time to read up on both languages. You may prefer the logic based syntax to the more generic C and Java instructions. Note that I wouldn't be trying to create high performance apps in either language.

Actually for a newbie on A.I.
I don't know how to compile A.I. program/algo to my main program
Can anyone give me some hints on this field?

Eh? You write an AI program like any other program. GA/GP involves you writing the fitness function, algorithms to manipulate the "genes", etc. Neural networks require you to program in assigning weights, etc.

There is no separate "AI program". AI is part of your program, right? I'm sorry if I don't understand your question. Can you be more specific?

O thz~
because actually I don't want to add codes to my main program like a part of function since the skeleton of my program - graphics, controls is already finished
I am a newbie in A.I., so can I seperate another file call AI to run AI instructions?
juz like c lang and java can compile several files to one.....

I'm sorry, but I still don't understand your confusion. You're treating AI like an alien object. It's not. It's no different than programming graphics code, or controls, or sound. Your AI code just deals with AI instead of anything else.

Whether it's in a separate file, under your main(), in another existing file, uses OOP, etc, is irrelevant. Does it matter whether your graphics code is all in one file or multiple files? It's a design choice, but in the end, its all graphics, right?

I'm sorry, but I still don't understand your confusion. You're treating AI like an alien object. It's not. It's no different than programming graphics code, or controls, or sound. Your AI code just deals with AI instead of anything else.

Whether it's in a separate file, under your main(), in another existing file, uses OOP, etc, is irrelevant. Does it matter whether your graphics code is all in one file or multiple files? It's a design choice, but in the end, its all graphics, right?

O thz~
Since I am a newbie on A.I.
I am quite afriad on that.....many people think A.I. is the hardest part of computer programming.....










privacy (GDPR)