Write a Bot/AI that can play SNES
Moderator: ZSNES Mods
Write a Bot/AI that can play SNES
Hi,
i am interessting if anything like that has been tried before, search came up with no results
Is there any know method to read the game state out of ZSNES?
Per Example we want the AI to play Tetris. How can we get the position of each block?
Best option would be to directly read it out of the memory, but where?
Sending input to ZSNES is not that hard.
i am interessting if anything like that has been tried before, search came up with no results
Is there any know method to read the game state out of ZSNES?
Per Example we want the AI to play Tetris. How can we get the position of each block?
Best option would be to directly read it out of the memory, but where?
Sending input to ZSNES is not that hard.
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Re: Write a Bot/AI that can play SNES
SNES9x has lua scripting support that lets you do something like that. ZSNES currently has no support for it.
As to writing the bot itself, it's game-dependant. If noone already did the work for you, you'll have to read the game code yourself to see what's where and so on.
As to writing the bot itself, it's game-dependant. If noone already did the work for you, you'll have to read the game code yourself to see what's where and so on.
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Re: Write a Bot/AI that can play SNES
ah ok thats good news! thank you
what i found so far:
http://tasvideos.org/forum/viewtopic.php?t=6539 Snex9X v1.43+ v11 beta + lua 0.06
http://dehacked.2y.net/snes9x-lua.html function library for Snex9X
should me get starting
but is there a unix version with lua? or best multi platform?
what i found so far:
http://tasvideos.org/forum/viewtopic.php?t=6539 Snex9X v1.43+ v11 beta + lua 0.06
http://dehacked.2y.net/snes9x-lua.html function library for Snex9X
should me get starting
but is there a unix version with lua? or best multi platform?
Re: Write a Bot/AI that can play SNES
That version is really, really old. Get it from here instead: http://code.google.com/p/snes9x-rr/bugger wrote:http://tasvideos.org/forum/viewtopic.php?t=6539 Snex9X v1.43+ v11 beta + lua 0.06
http://dehacked.2y.net/snes9x-lua.html function library for Snex9X
You may want to read this too: http://code.google.com/p/snes9x-rr/wiki ... gFunctions
Re: Write a Bot/AI that can play SNES
Wouldn't you want an AI to visually inspect the screen?
Maybe these people were born without that part of their brain that lets you try different things to see if they work better. --Retsupurae
Re: Write a Bot/AI that can play SNES
OP said it best.bugger wrote:Best option would be to directly read it out of the memory
Why yes, my shift key *IS* broken.
-
- ZSNES Shake Shake Prinny
- Posts: 5632
- Joined: Wed Jul 28, 2004 4:15 pm
- Location: PAL50, dood !
Re: Write a Bot/AI that can play SNES
Clunky and slow as hell, and will still require game-specific code. If you have to do some custom source reading, better work on the internal arrays representing the layouts, not their video result (guaranteed horror to work with).paulguy wrote:Wouldn't you want an AI to visually inspect the screen?
皆黙って俺について来い!!
Pantheon: Gideon Zhi | CaitSith2 | Nach | kode54
Code: Select all
<jmr> bsnes has the most accurate wiki page but it takes forever to load (or something)
Re: Write a Bot/AI that can play SNES
That's true, I just think that if you're making an AI for a specific game, it would be interesting to try to figure it out visually, as a human wouldd do.
If one is to write a bot for tetris, though, why build off of an emulatedd version? May as well work off an open source tetris source. Maybe take one that could use a vs computer mode and add an AI to that.
If one is to write a bot for tetris, though, why build off of an emulatedd version? May as well work off an open source tetris source. Maybe take one that could use a vs computer mode and add an AI to that.
Maybe these people were born without that part of their brain that lets you try different things to see if they work better. --Retsupurae
Re: Write a Bot/AI that can play SNES
yeah thats good! thanks mzmz wrote:That version is really, really old. Get it from here instead: http://code.google.com/p/snes9x-rr/bugger wrote:http://tasvideos.org/forum/viewtopic.php?t=6539 Snex9X v1.43+ v11 beta + lua 0.06
http://dehacked.2y.net/snes9x-lua.html function library for Snex9X
You may want to read this too: http://code.google.com/p/snes9x-rr/wiki ... gFunctions
Lets see if i get anything done.
Gonna let u guys know, thx so far!
Re: Write a Bot/AI that can play SNES
I had the live wallpaper on my phone for that one. It killed my battery pretty good, though.Johan_H wrote:Relevant
Maybe these people were born without that part of their brain that lets you try different things to see if they work better. --Retsupurae
Re: Write a Bot/AI that can play SNES
ok snes9x has a ram watcher pretty nice! but somehow snes9x crashes sometimes really annoying...Whats the easiest way to analyze the memory?
I tried Cheat Engine... Opened the snes9x.exe and looked at RAM addresses 0x7e0000-0x7fffff but only zeros
The OS (Windows 7) protects the memory from being read by other processes?!. ;(
Last edited by bugger on Tue Jan 24, 2012 11:33 pm, edited 3 times in total.
Re: Write a Bot/AI that can play SNES
Also is there a way to open snex9x with some parameters that it runs the game and loads saved game state in slot 1?!