Hexapawn

From Rosetta Code
Revision as of 10:52, 5 June 2015 by rosettacode>Paulo Jorente (Created page with "{{draft task|Games}}Implement Martin Gardner’s game [http://en.wikipedia.org/wiki/Hexapawn Hexapawn] so that one can play against the computer. Hexapawn is played on a 3 x 3...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Hexapawn is a draft programming task. It is not yet considered ready to be promoted as a complete task, for reasons that should be found in its talk page.

Implement Martin Gardner’s game Hexapawn so that one can play against the computer.

Hexapawn is played on a 3 x 3 square board. The near rank contains your three pawns, and the far rank contains those of the computer. It should “memorize” good moves and discard bad ones, after enough rounds, it will have learned from its mistakes and will become unbeatable.

Description.

Extras:

  • Make the board size variable, letting the player decide its size. Something like 3 to 8
  • It would be cool to have a trainer, so you don’t need to play until it learns