It is currently Mon Dec 11, 2017 7:38 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Jun 06, 2017 10:52 am 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 303
Location: Colorado USA
Yeah, I'm trying to program an A.I that can play Pac-Man. However, to do that I would need to access the variables that the game is using. How would I do that? I also need to program software that can emulate a USB controller and have that control the A.I's input. Is what I'm doing impossible?


Top
 Profile  
 
PostPosted: Tue Jun 06, 2017 11:18 am 
Offline
User avatar

Joined: Tue Apr 04, 2017 1:22 pm
Posts: 19
Location: Ohio, USA
A while ago, someone made an AI that learned to play Super Mario World.
https://www.youtube.com/watch?v=qv6UVOQ0F44

Looks like he used the BizHawk emulator, which can be scripted using Lua. The scripting engine probably provides access to the internal "RAM" of the emulated system, so you can get values for sprite positions and return controller inputs.

_________________
http://zutanogames.com/ <-- my dev blog


Top
 Profile  
 
PostPosted: Tue Jun 06, 2017 12:20 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
Emulators with Lua scripting allow you to read and write to RAM. You'll have to reverse engineer the game (or read someone else's notes on it) to know where the variables you need are and how to interpret them. You can also manipulate joypad input using Lua.


Top
 Profile  
 
PostPosted: Tue Jun 06, 2017 3:04 pm 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 303
Location: Colorado USA
Okay, I can't find documentation on the NES version of Pac-Man, so I switched to Donkey Kong. However, is there a physics analysis anywhere on Donkey Kong?


Top
 Profile  
 
PostPosted: Tue Jun 06, 2017 5:00 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1866
Location: DIGDUG
My first NES project was a graphics hack of PacMan. I also changed the maze. I can tell you anything you want to know about PacMan.

But, I don't think this is the right project for you.

A better idea would be to reverse engineer PacMan as a learning experience, to learn NES development. Not that PacMan uses the best practices for NES programming, but it would be a start.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Wed Jun 07, 2017 5:00 am 
Offline
User avatar

Joined: Wed Sep 21, 2016 8:55 am
Posts: 57
Location: Calgary.Alberta,Canada
http://www.romhacking.net/documents/540/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group