Skip to content
This repository has been archived by the owner on May 21, 2021. It is now read-only.

ksallberg/block-battle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published