AI
Moderator: BigEvilCorporation
AI
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 ?
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 ?
-
- Very interested
- Posts: 2443
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
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...
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
Re: AI
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 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.
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!
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!
Ya
I'm more or less coding the fight part of a rpg 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
I'm more or less coding the fight part of a rpg 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
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 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.
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.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
Yes, quite true, and a good play on the actual initials.Shiru wrote: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 wrote:..called "AS - Artificial Stupidity" by programmers.
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
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.
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.
-
- Very interested
- Posts: 2984
- Joined: Fri Aug 17, 2007 9:33 pm
-
- Very interested
- Posts: 2443
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
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
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
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...
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...