aleju / mario-ai Goto Github PK
View Code? Open in Web Editor NEWPlaying Mario with Deep Reinforcement Learning
License: MIT License
Playing Mario with Deep Reinforcement Learning
License: MIT License
I got this working with some tweaks.
Question, do you have a newer project? Also, how can I get the agent to improve over time? I wanted to see if use a MoA ( Mixture of Agents ) approach and improve upon some of the agent limitations beyond level 1.
Please let me know if you are active on other or similar projects, I know a lot of this code is old! ( I created a virtual env for the dependencies )
Will this command work on Windows
You have the screenshot filepath set to /media/ramdisk
I think that /tmp
is a better location, as its a standard ramdisk.
Alternatively, the creation of /media/ramdisk should be included in the installation guide.
Cheers!
config.lua
:
-- filepath where current game's last screenshot will be saved
-- ideally on a ramdisk (for speed and less stress on the hard drive)
SCREENSHOT_FILEPATH = "/media/ramdisk/mario-ai-screenshots/current-screen.png"
Hi, aleju. I have followed your instructions and I got stuck in:
Now start the training via Tools -> Run Lua script... and select train.lua.
when I do this operation, the lsnes will throw an error:
Error running Lua hunk: [string "train.lua"]:5: module 'paths' not found:
no field package.preload['paths']
no file './paths.lua'
no file '/usr/local/share/lua/5.1/paths.lua'
no file '/usr/local/share/lua/5.1/paths/init.lua'
no file '/usr/local/lib/lua/5.1/paths.lua'
no file '/usr/local/lib/lua/5.1/paths/init.lua'
no file './paths.so'
no file '/usr/local/lib/lua/5.1/paths.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
But I have already installed paths in ~/torch by using luarocks and require 'paths' works fine in lua cmd line.
It seems that lsnes doesnot recognize modules in torch?
So, I install package 'paths' in /usr/local/lib/luarocks, then this error was replaced by: module 'torch' not found.
Any idea for what's wrong with this problem? Thx
Can you make a video tutorial on installing this ai? This would be very helpful
Hey,
I'm currently trying to get your mario project to work. I was able to resolve most problems that came up while following your tutorial, but now I'm stuck. When compiling the emulator, I get the following error:
...
make -C bsnes-legacy
make[3]: Verzeichnis „/home/jojo/emulator/lsnes-rr2-beta23/sources/src/emulation/bsnes-legacy“ wird betreten
g++ -c -o core.o core.cpp -I../../../include -I../../../bsnes -I/usr/include -I/usr/local/include -I/usr/include/lua5.1 -std=gnu++0x -pthread -g -DNATIVE_THREADS -DUSE_LIBGCRYPT_SHA256 -DBSNES_IS_COMPAT -DBSNES_HAS_DEBUGGER -DBSNES_VERSION=\"085\" -DLIBSNES_INCLUDE_FILE=\"ui-libsnes/libsnes.hpp\" -Wreturn-type
In file included from ../../../bsnes/nall/array.hpp:10:0,
from ../../../bsnes/snes/snes.hpp:28,
from core.cpp:49:
../../../bsnes/nall/bit.hpp: In instantiation of ‘constexpr unsigned int nall::uclip(unsigned int) [with int bits = 24]’:
../../../bsnes/snes/cpu/core/registers.hpp:52:69: required from here
../../../bsnes/nall/bit.hpp:13:3: error: body of constexpr function ‘constexpr unsigned int nall::uclip(unsigned int) [with int bits = 24]’ not a return-statement
}
^
../../../bsnes/nall/bit.hpp: In instantiation of ‘constexpr unsigned int nall::uclip(unsigned int) [with int bits = 2]’:
../../../bsnes/nall/varint.hpp:32:55: required from ‘nall::uint_t<bits>::uint_t(unsigned int) [with unsigned int bits = 2u]’
../../../bsnes/snes/controller/controller.hpp:27:33: required from here
../../../bsnes/nall/bit.hpp:13:3: error: body of constexpr function ‘constexpr unsigned int nall::uclip(unsigned int) [with int bits = 2]’ not a return-statement
Makefile:44: die Regel für Ziel „core.o“ scheiterte
...
This sounds like a bug in the code to me. I checked the file bit.hpp, the corresponding block looks fine to me:
template<int bits> constexpr inline unsigned uclip(const unsigned x) {
enum { m = (1U << (bits - 1)) + ((1U << (bits - 1)) - 1) };
return (x & m);
}
The error points to the last closing bracket.
Although this is more of a problem with the emulator than with your code, maybe you came across this problem before or know something that could help me?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.