GithubHelp home page GithubHelp logo

jaspervdj / planet-wars-haskell Goto Github PK

View Code? Open in Web Editor NEW
33.0 4.0 13.0 1.13 MB

Unofficial Haskell starter package for the Planet Wars AI contest

License: Do What The F*ck You Want To Public License

Java 34.53% Haskell 65.47%

planet-wars-haskell's Introduction

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.

planet-wars-haskell's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

planet-wars-haskell's Issues

Interpreted

Not sure why, but if I compile the Main.hs file, the PlayGame tool will work fine, but if I try:
java -jar tools/PlayGame.jar maps/map7.txt 1000 1000 log.txt "java -jar example_bots/RageBot.jar" "runhaskell /home/bana/haskell/planet-wars-haskell/Main.hs" | java -jar tools/ShowGame.jar
WARNING: player 2 timed out.
Turn 1
Player 1 Wins!

It seems to timeout. Maybe I'm missing something about how runhaskell handles stdin/stdout.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.