ksallberg / block-battle

Haskell starter bot for The AI Games block-battle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

block-battle

Haskell starter bot (random moves) for AI Block Battle (Beta), parsing the full supported set of outputs from the game engine.

http://theaigames.com/competitions/ai-block-battle
http://theaigames.com/competitions/ai-block-battle/getting-started

Set "debug' = True" to enable debug logging
Example usage:

debug $ putStrLn "message"

Use "handleAction" as a hook for adding your AI behaviour. In this function, use state to access the GameState type that represents all information the game engine has provided so far.
handleAction :: String -> Context() To access the IO monad from the StateT monad transformer, use:

liftIO $ putStrLn "some IO"
xyz <- liftIO someReturningIO

Implemented as a StateT (easy to incrementally update the game state when receiving updates from the admin script) monad with IO as inner monad (easier to debug when developing...).

URL to the development repo: https://github.com/ksallberg/block-battle

About

Haskell starter bot for The AI Games block-battle

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 99.8%Language:Shell 0.2%