Question

I have taken an AI course, and the teacher asked us to implement a game that makes use of one of the AI algorithms. Here is where I need a bit of help:

  • I don't know to what kind of games each algorithm is applied
  • if you could just give an example of a game or game type and the algorithm it uses, I would appreciate it

I don't need any coding help, I can manage that (my language of choice is Java). I only need a little help on selecting an algorithm.

Was it helpful?

Solution

In adjunct to Ben's answer, a good combo is alpha-beta pruning along with a game like connect 4. The heuristic for something like tic-tac-toe is too simple, and for chess, too complex. But connect 4 or a similiar "middle of the road" game can be an excellent place to see how the heuristic makes a big difference in both efficiency and quality, and it's also complex enough to even get some "niche" heuristics that can win some scenarios over other, generally better heuristics. The rules of connect 4 in particular are simple enough that it's very easy to come up with your own successful heuristics to see these things in action.

Another common AI to play with is A* for pathfinding, such as unit travel in an RTS or sandbox environment.

OTHER TIPS

Alpha-beta pruning is a good one for game trees in general, and turn-based games like chess and tic-tac-toe in particular.

Any game can use any AI algorithm, if you have a 2d game where "enemies" follow you, you can use fuzzy logic to make the trajectory. In the same way that you could use a net(of any kind) to make them "learn" the best way to follow you. (If they where plenty, you could use genetic algoritms to make them learn in generations)

So go, think of something fun and THEN ask where a decision could be improved with AI and have FUN(this is the most important part of it)

And you can check this book to get some ideas, my bet is your uni have it somewhere in the library

As already mentioned A* is a great algorithm for pathfinding in games. Here is a tutorial (with source) on how this is implemented.

Good luck!

You could try the N puzzle and the A* search algorithm using Manhattan distance as the heuristic function.

What about Markov Chain Monte Carlo or MCMC algorithmn. http://en.wikipedia.org/wiki/Markov_chain_Monte_Carlo

In my A.I. class I did one with Bayesian Networks to calculate Probability. it wasn't too too difficult but was def. interesting.

You can start with simple tile-based map and simple path finding algorithms such as mentioned above A*. After you can try to make game with free movement alongside all game map.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top