Rules of the game: * Game consists of colored blocks. You start at top left, computer starts at bottom left, both with initial 1 block. Every time you change your color all the blocks with this new color that have an edge with your previously owned blocks become yours. * Game goes on until all blocks have been assigned. * You can't change to your opponents color * You HAVE to change your color on your turn
Rules for computer: Can only look into 1 step in the future.
Web: http://sasangootik.com/fillr/ CompVs.Comp: http://sasangootik.com/fillr/#auto
Git: https://github.com/shezarkhani/fillr.js
I have included 2 algorithms (very similar) and 1 I am working on which is already smarter than both. [Code is ugly and NOT optimized at all.]