Are these games really "beginner" games?

Started by
15 comments, last by markr 11 years ago

Ah ok. I still think it is better off implementing minimax since that is such a widespread algorithm with many applications.

I still consider that list of rules an "expert system", since it is so coupled to tic tac toe, and isn't applicable to a wider set of problems. It's just that a lower level version of "expert" is required ;)

I'm sure it can be adapted to Connect4 though, but it's likely to run into a load of special cases and then you're better off using some kind of tree search like minimax instead.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley
Advertisement
I would agree with minimax for connect four. I'd do it for the same reason you study minimax with tic-tac-toe rather than the hard-coded correct solution.

In some ways a rules-based approach could be more difficult to get right connect four. On a standard 7x6 board there will be many different rules in play at different locations on the board. With a rules-based approach there is only one rule with obvious priority: win. Everything else will have a higher or lower priority based on the state of the board. A minimax solver would be able to tell which of those multiple rules is the best to act on; it also would identify places that satisfy multiple rules simultaneously.

The implementation would be much harder than either tic-tac-toe or Stratego (which is another frequently-used minimax game). In tic-tac-toe you consider eight sets of data in isolation. In Stratego you have 80 pieces and you have the option of considering each piece in isolation. In connect four it is more difficult to consider each piece of data in isolation; everything is based on the run length of sets.

I think programming any games is not an easy task.

And I thought the game of Heads and Tails coin game so easy, just 4 lines of code is enough... What am I missing here?

What physics library did you use for the heads and tails game?

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

What physics library did you use for the heads and tails game?

In my mind, I was thinking of a pseudo-random output return either true or false. And that's it. And it's a console application, not a Win32 app.

It was a joke ;)

The correct answer was of course "rand()"

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

It really depends what you want to do. Making a computer opponent which plays a *competitive* games in some of these is overwhelmingly difficult (Go!)

Making a computer opponent which plays them in a way which is better-than-random is in some cases easier.

The complexity of the rules is only one part. The difficulty of a game is not related to the compexity of its rules.

  • Go - Rules: Fairly easy to implement, Competitive AI: Outlandishly difficult.
  • Hangman - Rules: Trivial; Competitive AI: depends which side and what dictionary is used. Probably very easy.
  • Tic-Tac-Toe - Rules: Trivial; Competitive AI: Trivial. Perfect AI: Easy.
  • Chess - Rules: fairly easy to implement (although there are quite a lot of them!) Competitive AI: Challenging.
  • Connect Four - Rules: Trivial; Competitive AI: Moderate (I don't really know). Perfect AI may be possible.
  • Battleship - Rules: Trivial; Competitive AI: Fairly easy
  • Checkers - Rules: Fairly easy to implement; Competitive AI: Challenging (or maybe not, I haven't researched it in detail)

Mark

This topic is closed to new replies.

Advertisement