Forums

AuthorPost
avatar  
Ravi

I am considering writing up an AI for Liars' Dice - while I setup the framework, does anyone have any suggestions for how the logic should work for it?

avatar  
x13420x

I will write one using autoit and then run it off my computer....if you have a suggestion for a better scripting program please tell me.

avatar  
x13420x

Oh may be difficult for the bot to see what cards it has. I am thinking of maybe somehow looking at what the image file name is..... not sure.

avatar  
Ravi

AutoIT is a good choice. However, like you mentioned, it will be difficult to identify the dice especially because they are not images. How about you code the logic in JavaScript, and I'll add it to the game as an AI? :)

avatar  
x13420x

Will be extremely resource heavy and I don't want to give away my algorithm.

avatar  
x13420x

You can't output the text in the same color as the background to ai bots can see what's going on?

avatar  
x13420x

I mean output the player's hand in white so the bot can easily read what cards he has.

avatar  
Ravi

Actually, if you write in javascript, you could even run the code through your browser. It will be much easier than using AutoIT to recognize the cards - think about everytime there's an interface change :P

avatar  
x13420x

Easier but very insecure....the database is like 70 mb......I doubt the browser can effeciently churn through that amount of data.

avatar  
Ravi

found this online: http://web.stanford.edu/class/cs109l/unrestricted/assignments/assn2/liars_dice.pdf

avatar  
x13420x

pdf is gone1

avatar  
Ravi

Yah, they must've taken it down. It was basically an assignment on coding an AI for liars' dice.

avatar  
x13420x

http://code.tutsplus.com/tutorials/how-to-build-a-python-bot-that-can-play-web-games--active-11117

:-) I have been spending hours trying to figure how to do it then I found this on hackers news wire

avatar  
x13420x

http://web.stanford.edu/class/cs109l/unrestricted/assignments/assn1b/main.pdf

avatar  
x13420x

if hex(PixelGetColor ( 328+$nextone,723,$hWnd),6) = 333333 then
if hex(PixelGetColor ( 310+$nextone,705,$hWnd),6) = 333333 then
$dice[$x] = 5
elseif hex(PixelGetColor ( 310+$nextone,745,$hWnd),6) = 333333 then
$dice[$x] = 3
else
$dice[$x] = 1
endif

avatar  
x13420x

elseif hex(PixelGetColor ( 310+$nextone,705,$hWnd),6) = 333333 then
if hex(PixelGetColor ( 310+$nextone,723,$hWnd),6) = 333333 then
$dice[$x] = 6
else
$dice[$x] = 4
endif
else
$dice[$x] = 2
EndIf

avatar  
x13420x

Finally I am figuring out how to get info from the screen using autoit. Took a while because I use zoomed in settings so the color reading were coming out bad.....then I realized I needed to just multiply all the coords autoit gave me by 1.5 and then everything works. :)

avatar  
Ravi

glad to see you're making progress :)

avatar  
Ravi

we finally have a bot, -AI-Madron

avatar  
x13420x

pretty awesome to be able to have a game with 10 players

avatar  
Ravi

Did you get to play 9 other humans?

New Post

Please Sign In to contribute to the Forums.
Cookies! This website uses cookies to ensure you get the best experience. With continued usage of the site you agree to the usage of cookies.