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.
Answer
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.