Unofficial Haskell starter package for the Planet Wars AI contest
Haskell Java
Latest commit 83a3e91 Nov 2, 2010 BSRK Aditya updated comments
Permalink
Failed to load latest commit information.
example_bots Add java example bots and tools Sep 15, 2010
maps Add example maps from python starter package. Sep 10, 2010
tools
.gitignore Divide into two modules Sep 7, 2010
Graphics.hs Minimal graphical client that can act as a bot. Oct 21, 2010
LICENSE Add license file Sep 7, 2010
MyBot.hs Use the name the official server expects Sep 12, 2010
PlanetWars.hs updated comments Nov 2, 2010
PlanetWarsGraphics.hs Minimal graphical client that can act as a bot. Oct 21, 2010
README.markdown Add building & running info to README Sep 15, 2010
Widget.hs Minimal graphical client that can act as a bot. Oct 21, 2010
planet-wars-client.cabal Minimal graphical client that can act as a bot. Oct 21, 2010
planet-wars-client.hs Changed the client to use the safer issueOrder' Oct 27, 2010

README.markdown

planet-wars-haskell

Unofficial Haskell starter package for the google ai contest.

What

The PlanetWars module contains a small library to build your bot on. The MyBot module contains a simple example bot, based on the example in the C++ starter package.

You should change the MyBot module to your liking. If you make any improvements to the PlanetWars module, I would appreciate if you have me pull your changes, so everyone can benefit from your improvements -- after all, we're trying to get the Haskell bots as high as possible in the ranking, right?

Building

You should be able to build your bot using:

ghc --make -O2 MyBot.hs

The server uses the -O2 flag as well. Now, you should have an executable called MyBot.

Running

Let's watch it fight against one of the java bots.

java -jar tools/PlayGame.jar maps/map7.txt 1000 1000 log.txt \
    "./MyBot" "java -jar example_bots/RandomBot.jar" | \
    java -jar tools/ShowGame.jar

More information can be found here.