An implementation of an adictive two-player card game http://www.ncc.up.pt/~pbv/stuff/lostcities
|Latest on Hackage:||0.2|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
This is an implementation of a short two-player card game
in Haskell using the wxWidgets GUI toolkit.
This program allows you to play against a computer AI using
a minimax algorithm with alpha-beta prunning (based on
Bird and Wadler's presentation in the "Introduction
to Functional Programming").
The game is played with a deck of cards numbered from 2 to 10
in 5 colors plus 3 "investment" cards for each color (marked with a
multiplication sign). The game progressed by playing cards
in columns of same colors of increasing value ("expeditions");
starting a new expedition costs -20 points and the played
cards are summed; the investment cards multiply the result
(positive or negative).
Crucially, the computer AI does not "cheat": unknown information
(i.e., the opponents hand and draw deck) is hidden
by considering possible scenarios that are compatible
with the known information. It seems to play only moderately well,
but still better than some online AI opponents I tried.
For more details check the Boardgamegeek page:
If you have any comments please drop me a line,
Department of Computer Science
Faculty of Science, University of Porto, Portugal