Skip to content

Instantly share code, notes, and snippets.

@shotarok
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shotarok/e08ddeba8c584507af07 to your computer and use it in GitHub Desktop.
Save shotarok/e08ddeba8c584507af07 to your computer and use it in GitHub Desktop.
SampleAI
LDC 0 ;; initial AI state
LDF 4 ;; Step Function
CONS ;; (init state, step func)
RTN
LDC 0 ;; Current AI state
LDC 1 :: AI direction move {0: up, 1: right, 2: down, 3: left}
CONS ;; (current state, move)
RTN
@shotarok
Copy link
Author

http://icfpcontest.org/game.html に最初からある、サンプルAI。
引数は使っていないが、引数にマップやゴーストの情報がある。
詳しくは http://icfpcontest.org/specification.html の Lambda-Man AI interface。

@shotarok
Copy link
Author

labeled version:

LDC  0 ;; initial AI state
LDF step
CONS ;; (init state, step func)
RTN
step:
LDC  0 ;; Current AI state
LDC  1 :: AI direction move {0: up, 1: right, 2: down, 3: left}
CONS ;; (current state, move)
RTN

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment