Skip to content

Using a Reinforcement Learning Algorithm to create Artifical Intelligence capable of playing Mario Brothers (1983)

Notifications You must be signed in to change notification settings

RelativeSpade/SuperMarioRL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 

Repository files navigation

Mario Reinforcement Learning

This project explores using reinforcement learning to train an agent to play Super Mario

Single-Threaded Version

The single-threaded implementation achieved the following results:

  • At 1 million iterations, it never beats level 1-1.
  • At 2 million iterations, it occasionally beats level 1-1.
  • At 4 million iterations, it consistently beats level 1-1.
  • At 5 million iterations, it flawlessly beats level 1-1.

How long did this take?

I ran these on my desktop, so they took longer than normal. Roughly 2 hours per million iterations with an RTX 3070 Ti.

"Multi-Threaded" Implementation

Currently, the multi-threaded implementation is not true multithreading; It's like asking 8 people to perform the same task simultaneously yet separately while True multi-threading would be a team of 8 people working together on the task. Therefore, I will not be spending time running iterations to test for performance differences, as it is incredibly unlikely to have any positive effect at this moment. However, I will return to this eventually to finish implementing proper multithreading.

How to Run This Yourself?

Frankly, I doubt anyone cares enough to do so, but I will include this nonetheless.

Requirements

  • Python: 3.6.0 - 3.9.0
  • Stable-Baselines3: 1.5.0
  • Pip: 21.0 (or newer)
  • Gym: 0.21.0
  • Wheel: 0.38.0
  • Setuptools: 65.5.0

(all can be downloaded via pip)

(I cannot guarantee this will function properly on any version other than those listed above, as that is what I developed with.)

pip install stable-baselines3==1.5.0 gym==0.21.0 wheel==0.38.0 setuptools==65.5.0

About

Using a Reinforcement Learning Algorithm to create Artifical Intelligence capable of playing Mario Brothers (1983)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages