TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: fillr.js - lets make it smarter

1 pointsby gootikover 13 years ago
So the story is that i was playing fillr(http://fillrgame.com/index.html) on my phone and kept winning even on hardest levels, so I thought either my strategy is way too good or the computer is not smart enough. Either way I wanted to make an algorithm that could always win. What I have is done in less than an hour and not as smart as it can be. So let's make it smart :)<p>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<p>Rules for computer: Can only look into 1 step in the future.<p>Web: http://sasangootik.com/fillr/ CompVs.Comp: http://sasangootik.com/fillr/#auto<p>Git: https://github.com/shezarkhani/fillr.js<p>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.]

no comments

no comments