FCEUX Genetic Programming: Mario

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
2,686
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 17, 2009

In this video, Mario is controlled by the top program spawned during generation 5. The genetic programming backend is written as a Lua script for the FCEUX emulator. The programs created by this script use an expression tree, which has the ability to do simple arithmetic, bitwise operations, and read from the RAM of a running game. The expression is evaluated each frame and the states of the relevant buttons, A B and the D-pad, are determined by the first 6 bits of the final result.

When a user first runs the script, it creates a saved state. This saved state is used as the starting point for every subsequent run of a generated program. I am using Roulette wheel selection and a relatively high mutation rate.

The Fitness of a program is measured by the number of points scored before dying. One interesting thing to note is that the program shown here has discovered a loophole. Mario can throw himself into a pit, which does not trigger the "Dying" flag at location 0x000E, which I am reading to determine whether Mario has died. The program is exploiting this, and the fact that points persist between deaths, to score more overall points. In fact, the program doesnt terminate until Mario dies on the title screen demo. Luckily for this program, the score is still shown on the counter during said demo, so it can still be measured.

Category:

Gaming

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Top Comments

  • So, moonwalking is an evolutionary advantage?

  • lol it insists on going backwards hahahaha

see all

All Comments (13)

Sign In or Sign Up now to post a comment!
  • Maybe better fitness measurements would be Mario's X position, powerup status, time and lives remaining... you could even use distance from monsters?

  • @nutharvest -_-

  • @INEEDZALL

    and the award for the most relevant comment goes to...

  • You should factor in the time it takes Mario to complete that stage in your fitness calculations. That way you might create a generation of speedrunners.

  • Where's the code? I definately want to look at it.

  • it likes jumping doesnt it! XD

  • i have a problem with my fceux emulator!

    when i play batman nes batmans purple not black and grey

    HALP!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more