AI

Talk about anything else you want

Moderator: BigEvilCorporation

Post Reply
KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

AI

Post by KanedaFr » Fri Sep 07, 2007 10:19 am

Well, if there is something I really unable to understand it's AI

I can find an approach, I already read thousands of articles on it and still, I don't understand.

Thanks to Fonzie, I find a way to code an (fake) AI for a race game.
I already analysed a fight game when CPU fighter use a mix of time left/blood left/previous attack/distance/random to know what to do.
There is a lot of ressource about shooting game (not a lot of AI).

but about others....?

In fact, only one kind of games minds me : SLG
Even I don't play them a lot (they need times), I like games like SForce, AWars, GadgetTrial, Senryaku Musume or others tactics and I hope to make one ...
If making a P1 vs P2 isn't that hard, I really don't know how to make a Player VS CPU :(
I only see one approach : at start, any CPU 'heroe' looks for their goal (based on their HP/MP for ex) and properties (defend boss, kill main character, heal allies). If a death occurs or a main heroe is in difficulty, we redefine these goals.

Some hints or links guys ? ;)

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Fri Sep 07, 2007 10:46 am

Sooner or later I run into the same problem... but in a shooter, I guess "search and destroy" will be the most efficient... and maybe "if player too strong then retreat"...

Your idea is good too...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Re: AI

Post by Shiru » Fri Sep 07, 2007 11:16 am

KanedaFr wrote:...
I only see one approach : at start, any CPU 'heroe' looks for their goal (based on their HP/MP for ex) and properties (defend boss, kill main character, heal allies). If a death occurs or a main heroe is in difficulty, we redefine these goals.
I don't know any of games, which you mentioned, but seems you speak about TRPG genre (something like FF Tactics, Front Mission, etc). So, your idea is generally right - AI characters must have goals, usually 'kill enemy main character'. In other part, it's like chess/checkers/gomoku/etc games. AI checks all possible moves (even maybe for some moves forward), except ones that mismatching for goals, and in order of assumed effeciency. Then most effective move must be selected and performed. That is hardest part of algorithm, you must find some criteries and formula to calculate moves efficiency. Depending from algorithm, that also can include or not include AI characters interaction (team AI). Checking for all moves usually takes time, you can see it in many TRPG games when many characters in battle (so, many moves is possible).

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Fri Sep 07, 2007 11:36 am

hmm...you're right, it's an interesting and more 'challenging' way...
I check what is the best (cost less, ...) way to move for every npc every turn.
Now, with this, you can make an invicible CPU ;)
I think a 'stupidy' property for each npc can handle this...like 'this is the best move but since you're stupid, choose between this 3 good solutions'

interesting....
I just found (it's always like that, it's when I ask others people that I find a way to the answer) this link: the 4 first articles are very interesting


oh, and yes, it's TRPG! they had so many names! It's why it's hard to find one on PC, they are often in RPG (so many to test) or Simulation (with C&C and The Sims(!) )
I don't talk about finding them in non-asian language!

Fonzie
Genny lover
Posts: 323
Joined: Tue Aug 29, 2006 11:17 am
Contact:

Post by Fonzie » Fri Sep 07, 2007 11:40 am

Ya :)
I'm more or less coding the fight part of a rpg :D So I have to face the problem too ;)

For example, I have several enemies minds like "bastard", "frustrated", "scared", "hero"... Depending of those settings, the formula between "run away", "attack", "defend" slightly edits + there is always the help of random numbers ;)

And the enemy can always "cheat" by knowing your HP level and the attack you're going to do ;P héhé :) Keep this in mind, especially for the "bastard" mind ;)

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Fri Sep 07, 2007 8:01 pm

There's really no such thing as "Artificial Intelligence" in computers. It takes too many resources to even begin to simulate properly. So what you wind up with is more like instincts, pre-programmed reactions to certain stimuli, or often called "AS - Artificial Stupidity" by programmers.

You might want to look up the A* algorithm (pronounced A-star). It was long used by PC board routing software, but has since been applied to many aspects of games, from choosing paths for computer characters, to determining which actions are "best" based on the current state of the game.

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Fri Sep 07, 2007 10:27 pm

Chilly Willy wrote:..called "AS - Artificial Stupidity" by programmers.
Don't know about other world, but here there is sort of game programmers joke - 'I in AI means not Intelligence, but Idiocy'.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sat Sep 08, 2007 3:22 am

Shiru wrote:
Chilly Willy wrote:..called "AS - Artificial Stupidity" by programmers.
Don't know about other world, but here there is sort of game programmers joke - 'I in AI means not Intelligence, but Idiocy'.
Yes, quite true, and a good play on the actual initials. :lol:

Here's the wikipedia entry for the A* algorithm. It's probably a good place to start with that particular subject.

http://en.wikipedia.org/wiki/A%2A_search_algorithm

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Sat Sep 08, 2007 4:47 pm

yeah, I knew about A* .
Quite useful for a tactic game when a NPC's goal is to reach and kill a guy.
I was more after what kind of action use, how to attribute them to NPC, etc... with as little as needed of intelligence.
it's pretty easy to make a game when you can't win (0 error, perfert tactic and cheating) but a lot harder to make a game 'playable' and hard enought to give the player pleasure to play and restart if he loose.

Chilly Willy
Very interested
Posts: 2984
Joined: Fri Aug 17, 2007 9:33 pm

Post by Chilly Willy » Sat Sep 08, 2007 6:29 pm

At the bottom of the wiki page is a link back to the category page, which has a bunch of different AI algorithms. You might check if anything there is useful.

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Mon Sep 10, 2007 8:29 am

I found interesting topic in AI Wisdom...

very very interesting!

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Mon Sep 10, 2007 1:51 pm

VERY VERY VERY VERY interesting !!!!
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Wed Sep 12, 2007 10:56 am

other links I found

http://www.gameai.com/influ.thread.html
http://www.gameai.com/strat.thread.html
they are old so interesting because they don't assume you already know the basis.


http://www.gamasutra.com/view/feature/1 ... s_for_.php
this one have some weeks !!!
funny...

Post Reply