Saturday, December 19, 2009

FARKEL

I have been trying to make something that will detect the dice in FARKEL(on Facebook), So I can make something to play it.

I have found that the dice may look different but each par is the same so all the 2s are the same.

So I just have it get a screenshot of the game then it checks each pixel to see if it is white if it is then it assumes that it is a dot on a die, So then it will check a pattern for each die starting at 6 and ending at 2.

If it could not find any then it assumes it is a 1.

When it has made it thru the screenshot, then it loops thru all of the ones and checks to see if it is farther away then 30 from any die, Then it adds all the ones that are left to the list of dice.

 

From there you just have to check to see if there is 6 6’s or 6 5’s etc..

 

Currently it will just play if there is 6 dice and it doesn’t always get the best move.

2 comments:

abigail said...
This comment has been removed by a blog administrator.
Unknown said...

Nice work