Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 22 Dec 2011 06:24 PM |
| Just out of curiosity, is it very complex to create a good artificial intelligence, for lets say a board game? I have a very sad feeling that it is, but maybe there's some sorta algorithm.. |
|
|
| Report Abuse |
|
|
|
| 22 Dec 2011 06:26 PM |
| Depends. What scripting family does this "board game" run on? Or is it a ROBLOX place? |
|
|
| Report Abuse |
|
|
Flurite
|
  |
| Joined: 03 Apr 2011 |
| Total Posts: 5386 |
|
|
| 22 Dec 2011 06:34 PM |
A ROBLOX place.
But just in general. I've never seen one on ROBLOX, that's for sure. >.> |
|
|
| Report Abuse |
|
|
aboy5643a
|
  |
| Joined: 20 Nov 2010 |
| Total Posts: 2785 |
|
|
| 22 Dec 2011 09:22 PM |
| Just do some logical calculations in your code. Predict some expected outcomes as an input and take that input, manipulate it logically and then output something that makes sense. My GUI physics game has AI "cows" that can take touching input (like a wall) and try to solve getting around or something similar by jumping and updating their movement direction. |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 22 Dec 2011 09:39 PM |
| Machines currently fail miserably in dynamic situations. It's a sad fact we all must accept. |
|
|
| Report Abuse |
|
|
myrkos
|
  |
| Joined: 06 Sep 2010 |
| Total Posts: 8072 |
|
|
| 22 Dec 2011 09:43 PM |
@blockoo narb,
it's not the machines themselves that fail, it's the programmers. Machines just do what they're told to. It's up to the programmers job to make them "dynamic". Machines are quite capable of doing so. |
|
|
| Report Abuse |
|
|
SDuke524
|
  |
| Joined: 29 Jul 2008 |
| Total Posts: 6267 |
|
|
| 22 Dec 2011 09:51 PM |
| It really all depends on the game. For example, if you were to make an AI for tic-tac-toe, that's pretty easy, if you're trying to make an AI for go, most professionals struggle with that. |
|
|
| Report Abuse |
|
|
McBlocker
|
  |
| Joined: 16 Nov 2008 |
| Total Posts: 1721 |
|
|
| 23 Dec 2011 01:10 PM |
Here's how I go about it, and it tends to work well.
Just set a list of things that a player can do (under any circumstance) ranked from most important to least important. Example: A racing game would be ranked: Find best path, find item box, use item.
Then, just subtract all the things that the AI cannot do at that moment, and just pick the most important one left. |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 23 Dec 2011 01:30 PM |
It totally depends on the game.
In games where you can easily construct a game tree with a reasonable size, then you can actually make a very good AI without much code. Even for more complicated games, such as checkers, we can currently "solve" the game, that is, if there is a way to force a win the program will be able to find it.
Generally the way you do it is: 1) Gather the current game state 2) Construct a list of every possible next move 3) Use a heuristic to cull most of the possible moves, leaving only ones which aren't completely stupid. 4) Repeat
The tricky part is compressing the data down into a compact enough form that you can store many many levels of the tree. Also, getting the heuristic good enough to make the branching factor relatively low. |
|
|
| Report Abuse |
|
|
|
| 23 Dec 2011 01:31 PM |
Where the AI can know every option, it tends to be relatively simple. Except in cases like Go or Chess where the game tree gets to be millions of options long in just 7 to 8 moves... |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 23 Dec 2011 03:53 PM |
| You can almost never have the AI know _every_ option. The tricky part is always deciding which options are remotely reasonable, and usually that will get rid of quite a lot of the possible options. |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 23 Dec 2011 04:07 PM |
| Depends on what every option is. If you're building a game from scratch, you control what the player can do. |
|
|
| Report Abuse |
|
|
stravant
|
  |
 |
| Joined: 22 Oct 2007 |
| Total Posts: 2893 |
|
|
| 23 Dec 2011 04:12 PM |
It would likely be a pretty boring game if there were few enough options to be able to list 100% of the possible game states.
Even a game with a branching factor of just 4 and 30 turns has 1.15*10^18 possible game states. |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 23 Dec 2011 04:27 PM |
| Until we figure out how to make personalities and creative thinking skills for machines, AI's will be very inefficient and very limited. |
|
|
| Report Abuse |
|
|
|
| 23 Dec 2011 04:32 PM |
@blockoo
We can already do that... But as long as it cant be made the way a real brain works you must hard code it in. |
|
|
| Report Abuse |
|
|
blockoo
|
  |
| Joined: 08 Nov 2007 |
| Total Posts: 17202 |
|
|
| 23 Dec 2011 04:46 PM |
| Not really. The stuff you see that claims to have a "personality" basically just mirrors a human subject. |
|
|
| Report Abuse |
|
|