# HG changeset patch # User Michael Pavone # Date 1406361530 25200 # Node ID 3812bf35168d3fcf8be5f2eb932218989f0672d2 # Parent 3287eb6c25fe178129c823666bc66f020ab176d9 Simple AI seems to work now. Lots of debug junk needs to be removed though diff -r 3287eb6c25fe -r 3812bf35168d code/dotScanner.lm --- a/code/dotScanner.lm Sat Jul 26 00:23:19 2014 -0700 +++ b/code/dotScanner.lm Sat Jul 26 00:58:50 2014 -0700 @@ -207,24 +207,32 @@ notdone <- 0 } else: { continuations <- fold: continuations [] with: :acc el{ + print: #[20 acc] ret <- acc if: notdone { ret <- el: + print: #[11 ret] if: (ret isInteger?) { + ret <- acc } else: { if: (ret value) { + print: 12 notdone <- 0 ret <- (ret tail) } else: { + print: 13 ret <- (ret tail) | acc } } } else: {} + print: #[21 ret] ret } + print: #[15 continuations] if: notdone { continuations <- flatten: continuations } else: {} + print: #[16 continuations] } } continuations @@ -274,6 +282,7 @@ } } else: { } + print: #[10 myLoc ret] ret } } @@ -286,7 +295,9 @@ visited <- treeMap: grid :row { treeMap: row :el { 0 } } + print: #[5 myLoc] path <- advancer: [(makeContClos: grid myLoc [])] + print: path #[0 (path value)] }