This repository has been archived by the owner on Feb 14, 2019. It is now read-only.
ICFP Programming Contest 2012 entry
License
mietek/icfp-contest-2012
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
The Church of the Least Fixed Point ICFP Programming Contest 2012 Miëtek Bak Aleksander Balicki Arek Flinik Maciej Kotowicz Tomasz Łoszko Jakub Michaliszyn Patryk Obara Wojtek Ogrodowczyk Luke Randall William Roe Rafał Rzepecki # Instructions ## Building $ make ## Packaging $ make tarball ## Running lifter $ bin/lifter < MAP_FILE ...or: $ bin/debuglifter < MAP_FILE ## Running validator $ echo MOVE_SEQUENCE | bin/validator MAP_FILE ...or: $ echo MOVE_SEQUENCE | bin/debugvalidator MAP_FILE You can specify the following flags: -v Just the score -vv Dump state once after all moves -vvv Dump state after every move # Using VM functions interactively $ ghci bin/libvm.o src/VM.hs ...or: $ ghci bin/libdebugvm.o src/VM.hs ...then: > s <- newFromFile "MAP_FILE" > dump s > dump (makeMoves_ s "MOVE_SEQUENCE") > print (getRobotPoint s) > print (get s (getRobotPoint s)) You can use the following functions: new :: ByteString -> State newFromFile :: String -> IO State (==) :: State -> State -> Bool dump :: State -> IO () getWorldSize :: State -> Size getRobotPoint :: State -> Point getLiftPoint :: State -> Point getWaterLevel :: State -> Int getFloodingRate :: State -> Int getRobotWaterproofing :: State -> Int getUsedRobotWaterproofing :: State -> Int getBeardGrowthRate :: State -> Int getRazorCount :: State -> Int getLambdaCount :: State -> Int getCollectedLambdaCount :: State -> Int getTrampolineCount :: State -> Int getTrampolinePoint_ :: State -> Char -> Maybe Point getTrampolinePoint :: State -> Trampoline -> Maybe Point getTargetPoint_ :: State -> Char -> Maybe Point getTargetPoint :: State -> Target -> Maybe Point getTrampolineTarget_ :: State -> Char -> Maybe Char getTrampolineTarget :: State -> Trampoline -> Maybe Target getMoveCount :: State -> Int getScore :: State -> Int getCondition :: State -> Condition get :: State -> Point -> Object isRobot :: State -> Point -> Bool isWall :: State -> Point -> Bool isRock :: State -> Point -> Bool isLambda :: State -> Point -> Bool isLift :: State -> Point -> Bool isEarth :: State -> Point -> Bool isEmpty :: State -> Point -> Bool isBeard :: State -> Point -> Bool isRazor :: State -> Point -> Bool isTrampoline :: State -> Point -> Bool isTarget :: State -> Point -> Bool makeOneMove_ :: State -> Char -> State makeOneMove :: State -> Move -> State makeMoves_ :: State -> String -> State makeMoves :: State -> [Move] -> State updateWorldIgnoringRobot :: State -> State imagineRobotAt :: State -> Point -> State getStep :: State -> Move -> Point imagineStep :: State -> Point -> Move -> Point isEnterable :: State -> Point -> Bool isSafe :: State -> Point -> Bool buildCostTable :: State -> Point -> CostTable getCost :: CostTable -> Point -> Cost getDist :: CostTable -> Point -> Cost
About
ICFP Programming Contest 2012 entry
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published