Mercurial > repos > icfp2012
comparison src/sim.tp @ 60:7d4e51b4769a
Add hashset based pruning
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Mon, 16 Jul 2012 01:55:04 -0700 |
parents | a37ceb0a4f5c |
children | ff2b38518a58 |
comparison
equal
deleted
inserted
replaced
59:ba17edeea7c7 | 60:7d4e51b4769a |
---|---|
369 myclone moves!: movesclone | 369 myclone moves!: movesclone |
370 myclone score!: score | 370 myclone score!: score |
371 myclone lambdaCount!: lambdaCount | 371 myclone lambdaCount!: lambdaCount |
372 myclone | 372 myclone |
373 } | 373 } |
374 hash <- { | |
375 value <- ((grid get: 0) id) * 128 | |
376 foreach: grid :idx el { | |
377 value <- 1000003 * value + (el id) | |
378 } | |
379 //TODO add in any important state from outside grid | |
380 value | |
381 } | |
374 } | 382 } |
375 foreach: in_grid :index el{ | 383 foreach: in_grid :index el{ |
376 _nextGrid append: el | 384 _nextGrid append: el |
377 if: (el isrobot) { | 385 if: (el isrobot) { |
378 _robot <- el | 386 _robot <- el |