The babylon package

[Tags: gpl, program]

The board game was originally designed by Bruno Faidutti (www.faidutti.com). In this implementation you play against the computer.


[Skip to ReadMe]

Properties

Versions0.1, 0.2, 0.3
Change logNone available
Dependenciesbase (==3.*), containers, haskell98, wx (>=0.11), wxcore (>=0.11) [details]
LicenseGPL
Copyright(c) 2009 Pedro Vasconcelos
AuthorPedro Vasconcelos <pbv@dcc.fc.up.pt>
Maintainernone
CategoryGame
Executablesbabylon
UploadedThu Jun 4 17:10:50 UTC 2009 by PedroVasconcelos
DistributionsNixOS:0.3
Downloads874 total (29 in last 30 days)
Votes
0 []
StatusDocs not available [build log]
All reported builds failed as of 2015-05-24 [all 1 reports]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for babylon-0.1

Babylon
-------

This is an implementation of a simple two-player game
in Haskell using the wxWidgets GUI toolkit.
This program allows you to play against the computer plays using
the classical minimax algorithm with alpha-beta prunning
(based on Bird and Wadler's presentation in the "Introduction
to Functional Programming").

The rules of the game are very simple: 
* there are 12 stone tablets in 4 colors (3 of each color)
* initially the stones are randomly placed on the table,
  forming twelve 1-stone piles
* on his/her turn, a player moves one pile ontop of another
  provided that they have the same height or the same top 
  color (or both)
* the first player who cannot perform a move loses the game.

The game play very fast, typically under 5 mins; since there
are only 12 piles at the start, and each turn decrements one 
pile, the game must finish in at most 11 moves.

Note that there is a winning strategy for the second player, but
it does not appear to be a simple heuristic for it (?). 
The computer will play the winning strategy at the hardest level, 
so it will always win as a second player at this level.

This was basically programmed in a single day as an experiment 
using this wxWidgets (though I was experienced with Haskell). 
I thought it would be a nice addition to show a simple but real
Haskell program.

If you have any comments please drop me a line,

Pedro Vasconcelos
pbv@dcc.fc.up.pt
Department of Computer Science
Faculty of Science, University of Porto, Portugal