Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411275 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 08:17:57 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)The Mario Genome
Pages: 1 [2] 3
Print
Author Topic: The Mario Genome  (Read 84719 times)
Core Xii
Level 10
*****


the resident dissident


View Profile WWW
« Reply #20 on: November 05, 2010, 03:53:11 AM »

How fast does it run? Without the vSync it should run as fast as your computer will allow it, as there isn't any timing code at all. As for the jumping I know plenty of real humans that randomly jump about when playing Mario.

How would I know how fast it runs? You didn't include a speed indicator of any kind. Am I supposed to guess how many frames per second I get? With everything else idle, your program uses 2-4% of my CPU time, and hitting Enter has zero discernible effect.

I also know plenty of real humans don't even play video games - Should we simulate those too? Of course not. I'm suggesting that you include visual aesthetic into your fitness function. Especially in tool-assisted speed running culture, entertaining the user is the secondary goal to getting the fastest time possible.

Also... The program does not save the genomes on exit. That makes it completely useless (I understand you may not have developed it to be useful in the first place, but still).
Logged
Oddball
Level 10
*****


David Williamson


View Profile WWW
« Reply #21 on: November 05, 2010, 04:02:06 AM »

Each run through should take eight seconds with vSync on. If it still takes that long without vSync on then I'd suggest your computer isn't giving the app enough cpu time. What OS are you using? Also why would you want to save the gene codes on exit? They aren't much use outside the program.

My comment about jumping was meant to be a joke. Facepalm
Logged

moi
Level 10
*****


DILF SANTA


View Profile WWW
« Reply #22 on: November 05, 2010, 04:07:45 AM »

This is awesome, this deserves to get posted somewhere else
Logged

subsystems   subsystems   subsystems
raigan
Level 5
*****


View Profile
« Reply #23 on: November 05, 2010, 04:13:56 AM »

Awesome! You should check out the recent Mario AI section of the AAIDE conferences:

http://julian.togelius.com/mariocompetition2009/
http://www.marioai.org/

These papers give an overview of the 2009 entries (and AFAICR full source for each bot is available):
http://julian.togelius.com/mariocompetition2009/GIC2009Competition.pdf
http://julian.togelius.com/Togelius2010The.pdf
Logged
Core Xii
Level 10
*****


the resident dissident


View Profile WWW
« Reply #24 on: November 05, 2010, 04:29:17 AM »

Each run through should take eight seconds with vSync on. If it still takes that long without vSync on then I'd suggest your computer isn't giving the app enough cpu time. What OS are you using? Also why would you want to save the gene codes on exit? They aren't much use outside the program.

Like I said, toggling vsync has no discernible effect. It runs at the exact same speed no matter how many times I hit Enter. I'm on Windows XP.

The point of saving is to be useful inside the program. You cannot expect us to evolve intelligence that is lost when you shut the program down, turn off your computer, the system crashes, etc. Saving allows the program to pick up where it left off. You should dump all the genomes on disk periodically and load them on start up.
Logged
Alistair Aitcheson
Level 5
*****


"Ali" for short


View Profile WWW
« Reply #25 on: November 05, 2010, 06:01:04 AM »

Wow, this is fascinating! Nice stuff!  Coffee
Logged

GameBrains
TIGBaby
*


View Profile
« Reply #26 on: November 05, 2010, 06:39:19 AM »

Very impressive results  Gentleman We did something similar. We evolved a behavior tree using Grammatical Evolution (a cousin of Genetic Programming). We fared fairly well in the Mario AI competition at CIG in Denmark

We will be posting some information about our results on our page soon: GameBrainsAI.com

Logged
Oddball
Level 10
*****


David Williamson


View Profile WWW
« Reply #27 on: November 05, 2010, 07:09:43 AM »

Ok I shouldn't still be working on this, but I altered the way genes control the Marios slightly. Behaviour should now be more consistent from generation to generation. The Marios will work out the solution much quicker, just over hundred gens in my first test, but might struggle to get a perfect speedrun. This also means I could lower the population significantly. I've added an equal number of controls for fairness, and I've altered the fitness test to use the amount of jumps as a tie breaker. If two Marios score the same on the fitness test then the Mario who made the least jumps is rated higher. Finally the genetic codes are now stored on exit to the file 'data.tmg' if you wish to start a fresh batch of gene codes then simply delete this file.


Thanks for all the comment I really didn't now this kind of stuff was so popular, and I'm surprised to find out there are contests for it.
« Last Edit: November 05, 2010, 07:27:12 AM by Oddball » Logged

Core Xii
Level 10
*****


the resident dissident


View Profile WWW
« Reply #28 on: November 05, 2010, 08:10:00 AM »

Nice to see someone take my fodder for what it is intended to be - Constructive criticism - Rather than trolling. Good job on the updates! The vsync still doesn't work for me though.

It's odd that I've never seen this "control" population in any other evolving program I've come across. What's the... story behind that? (I can see it's brutally effective, so intuitively I get it, but what's the technical description?) Shouldn't you transfer accidentally successful Marios from control to the evolving pool?

I'd color the Marios' overalls based on their genomes. Just a small visual thing, to tell them apart.

My little sister just figured the optimal solution: Hold both right and jump. Gets you to the end every time.
« Last Edit: November 05, 2010, 08:43:52 AM by Core Xii » Logged
Oddball
Level 10
*****


David Williamson


View Profile WWW
« Reply #29 on: November 05, 2010, 08:47:10 AM »

The control population are to see if given the same amount of time random input can do any better than the 'genetic' evolution. If you could find the solution using random inputs in a quicker time, then the genetic algorithm would have been a failure.

I don't know what is happening with the vSync on your setup. The only other thing I can think of is that the graphics driver is overriding my apps settings. Shrug
Logged

Core Xii
Level 10
*****


the resident dissident


View Profile WWW
« Reply #30 on: November 05, 2010, 09:02:01 AM »

If you could find the solution using random inputs in a quicker time, then the genetic algorithm would have been a failure.

Randomness is half the evolution. In the beginning when the evolving Marios are clueless, feeding successful random genomes from the control group to the evolving group would significantly speed up the initial learning. Later on, random searching is unlikely to find better genomes than the ones evolving, so what I'd do is move Marios from control to evolve, permanently, such that whenever a Mario is moved, the size of the control group is decremented and the size of the evolving group incremented. This way, early on the randomness feeds the learning and later on, doesn't slow down the processing.

What I've seen other evolvers do is begin the evolution with a pool of random genomes. In some evolutions all 1st generation genomes are randomly re-rolled if they die. Basically the same outcome as I described above, without a separate random pool.

The only other thing I can think of is that the graphics driver is overriding my apps settings. Shrug

Ahh, you are correct. Facepalm I've set my driver to override application settings for always vsync with triple buffering. Very few evolvers are graphical, so it's never come up before.
« Last Edit: November 05, 2010, 01:09:19 PM by Core Xii » Logged
PleasingFungus
Level 7
**



View Profile WWW
« Reply #31 on: November 05, 2010, 06:35:16 PM »

If you could find the solution using random inputs in a quicker time, then the genetic algorithm would have been a failure.

Randomness is half the evolution. In the beginning when the evolving Marios are clueless, feeding successful random genomes from the control group to the evolving group would significantly speed up the initial learning. Later on, random searching is unlikely to find better genomes than the ones evolving, so what I'd do is move Marios from control to evolve, permanently, such that whenever a Mario is moved, the size of the control group is decremented and the size of the evolving group incremented. This way, early on the randomness feeds the learning and later on, doesn't slow down the processing.

Core, you're missing the point. The control group isn't meant to help the genetic algorithm. It's meant to act as a... control group.

Oddball, this is really cool! Have you seen the Evolution Chamber for SCII? It's doing similar things, but somewhat more applied.
Logged

Finished games: Manufactoria! International King of Wine!
And others on my site.
Raptor85
Level 5
*****



View Profile WWW
« Reply #32 on: November 05, 2010, 08:28:25 PM »

Dunno if you saw, but
http://hackaday.com/2010/11/05/ai-via-super-mario-evolution/
Logged

-Fuzzy Spider
Core Xii
Level 10
*****


the resident dissident


View Profile WWW
« Reply #33 on: November 06, 2010, 01:53:33 AM »

Core, you're missing the point. The control group isn't meant to help the genetic algorithm. It's meant to act as a... control group.

I don't see how my method lessens the effect of the control group in any way. You still see if the evolution is actually working by looking if the evolving group is acting similar to the random control group; I.e. randomly.
Logged
nekosune
Level 0
*


View Profile
« Reply #34 on: November 06, 2010, 07:34:41 PM »

I was using the picture one, and after a day or so, it jumped so the one on the far right, was EXACTLY the one I gave it on the far left, the one in the middle is still a hazy indistinct version, unfortunatly me being an idiot, used a well adult picture, so can't really show it what happend. but it basically is showing the exact same picture as the source
« Last Edit: November 06, 2010, 07:43:12 PM by nekosune » Logged
PleasingFungus
Level 7
**



View Profile WWW
« Reply #35 on: November 06, 2010, 11:41:53 PM »

Quote
...so what I'd do is move Marios from control to evolve, permanently, such that whenever a Mario is moved, the size of the control group is decremented and the size of the evolving group incremented...

If you move Marios out of the control group (and into the test group), you're lowering its effectiveness. The point of the control group isn't to see whether the test group is 'acting randomly'; it's to see if the genetic algorithm approach is any more effective than just random button-mashing. As Oddball himself put it, "The control population are to see if given the same amount of time random input can do any better than the 'genetic' evolution." So, you take the same exact number of Marios, put them in the same situation, and only vary the input. That way, it's a fair test.

Copying Marios from the control group into the test group could be a valid approach, especially initially. But that's a different matter.

I'm not sure that a control group is really necessary for this program either way, though, so... not that big a deal.

Also, what on earth is nekosune talking about? At first I thought he was a spammer, but he'd be a really crummy one if so. No spam links, no spam signature. Maybe he's trying to infiltrate the forum first and win our trust...?
Logged

Finished games: Manufactoria! International King of Wine!
And others on my site.
bateleur
Level 10
*****



View Profile
« Reply #36 on: November 07, 2010, 01:22:43 AM »

Also, what on earth is nekosune talking about? At first I thought he was a spammer

She's talking about the picture evolving algorithm on this site, which was linked from the first post of this thread.
Logged

nekosune
Level 0
*


View Profile
« Reply #37 on: November 07, 2010, 05:55:44 AM »

I was using the version the OP said he had made like that one, the one available for download from the first post in the thread. And sorry if I sounded spam like :-S
Logged
Oddball
Level 10
*****


David Williamson


View Profile WWW
« Reply #38 on: November 07, 2010, 02:40:30 PM »

That is bizarre nekosune, and I have no idea how that is even possible. The polygons are rendered to a texture before being displayed in the window alongside the original, but still I can't envisage any way the texture could get replaced by the original image. I am amazed and stumped.
« Last Edit: November 07, 2010, 02:52:21 PM by Oddball » Logged

nekosune
Level 0
*


View Profile
« Reply #39 on: November 07, 2010, 05:03:28 PM »

May I PM you the link? I do not wish to post it here due to my stupidity with the starting image.
Logged
Pages: 1 [2] 3
Print
Jump to:  

Theme orange-lt created by panic