Pages: 1 2 [3] 4
  Print  
Author Topic: Using Neural Networks in Spelunky?  (Read 28971 times)
Nathan
Mossy
*
Posts: 5088



View Profile Email
« Reply #30 on: August 15, 2012, 03:04:27 AM »

In the most basic sense you control the "weights" of a neural network with a genetic algorithm. Here is an example. As you can see the AI uses both a neural network system along with a genetic algorithm. It can play random levels. I don't know enough about this stuff to determine if a pathfinding algorithm A* or neural network along with a genetic algorithm would work best with Spelunky
Logged

Kegluneq
Mossy
*
Posts: 2262



View Profile Email
« Reply #31 on: August 17, 2012, 09:20:03 AM »

Very neat.
I admit I only skimmed the wiki article and haven't watched too many of the videos, but from what I gather, this algorithm works on a kind of trial and error based "training" (I know y'all called it mutations earlier in the thread, but I feel like training is a little more fitting)
While that's cool, and I love the idea of learning AI, I think the pure A* is more efficient. As a comparison, that last video was an attempt after 800 trials, and still included quite a few mistakes. The A* AI I mentioned in this thread was able to do a flawless run without previous data.

But then again I guess that's the point? "Learning" is definitely more realistic compared to millisecond evaluation and near perfect reaction timing.

Either way, very interesting! Just sharing my thoughts.


Also, what's with this sudden surge of interest in AI, did I miss something?
Logged

A wild SHINY MOSSY appeared!
KarjamP
Mossy
*
Posts: 3684


Meet Miijam!


View Profile WWW Email
« Reply #32 on: August 17, 2012, 09:33:24 AM »

Actually, "mutations" and "training" are two different things.  Tongue

Training: Make something stronger.

Mutations: Alter something a bit.

Genetic algorithms use "Mutations" to help vary the generations after it's done splicing up the best of the previous generations into "offspring".

Genetic Algorithms is one of a couple of methods used to "train" an AI.

Also, you're biased towards A*.

A* is a pathfinder algorithm (that is, it searches for a path to go to next). Learning Algorithms can use pathfinder algorithms to plot their way around something.

Not to mention it can be difficult to implement (especially in platformers like Spelunky).

Pure A* isn't efficient for EVERYTHING (like, it can't play RTS or it can't power Shoppy, etc).

In contrast, learning algorithms, given enough time, can actually learn to play professionally, to the point where they seem to have superhuman abilities (like here).

You don't have to implement learning algorithms in Neural Networks, though.  Tongue

EDIT: Do you know there's a version of the AI you're refering to that uses Neural Networks? It controls Luigi to the exit using "sensors" to see.

Said AI used a genetic algorithm called NEAT to learn.
« Last Edit: August 17, 2012, 09:42:48 AM by KarjamP » Logged

Meet Bodyless!

3DS friendcode: 4210 - 4681 - 1626



Join Dropbox!

BTC: 1M7MKFdwwrDqqowMUkrCXKhcEi7a16pwWy
Nathan
Mossy
*
Posts: 5088



View Profile Email
« Reply #33 on: August 17, 2012, 11:07:20 AM »

With A* you have to make the AI flawless from the beginning. With Genetic Prigramming it does most of the work for you. Also the only thing you missed was a disscussion on how to make a flawless AI for the spelunker
Logged

Wonkyth
Mossy
*
Posts: 2129



View Profile
« Reply #34 on: August 17, 2012, 11:12:44 AM »

A* is generally implemented in a less-than-perfect state, since an approximation works fine. :3
Logged

Can you read the wry? Can you FEEL the wry?!
leafbarrett
Shoot
*
Posts: 28



View Profile Email
« Reply #35 on: September 12, 2012, 09:15:18 AM »

One thing that could be implemented as well, provided this ever gets off the ground, is active learning. Basically, the game can "watch" a player play, and try to imitate what the player does in various situations. For example, one thing I do whenever possible is flip-hang over the front of arrow traps. It will trigger the arrow a split second before you start hanging in front of it. The computer would see that I do that, and when I do that, I don't get hurt by the arrow, but when I don't, I will more often get hurt by it.
Logged
Nathan
Mossy
*
Posts: 5088



View Profile Email
« Reply #36 on: September 12, 2012, 12:06:11 PM »

That's what people think super smash bros does
Logged

KarjamP
Mossy
*
Posts: 3684


Meet Miijam!


View Profile WWW Email
« Reply #37 on: September 12, 2012, 01:08:04 PM »

That's what people think super smash bros does

That was proven to be a myth by skilled hackers.
Logged

Meet Bodyless!

3DS friendcode: 4210 - 4681 - 1626



Join Dropbox!

BTC: 1M7MKFdwwrDqqowMUkrCXKhcEi7a16pwWy
Nathan
Mossy
*
Posts: 5088



View Profile Email
« Reply #38 on: September 12, 2012, 09:25:45 PM »

That's what people think super smash bros does
That was proven to be a myth by skilled hackers.

Oh well it was a nice theory. I think using the learning theory (that watches you play) for a while before giving a GA/Nural Networ would get a few 1000 generations of work done. Then the GA/NN could perfect and make the Spelunker master the game. A Nural Network may not even be necessary if the learning code was used as the base. Also change title to Spelunker AI?
Logged

KarjamP
Mossy
*
Posts: 3684


Meet Miijam!


View Profile WWW Email
« Reply #39 on: September 12, 2012, 11:18:58 PM »

Try to convince me to change the title. Tongue
Logged

Meet Bodyless!

3DS friendcode: 4210 - 4681 - 1626



Join Dropbox!

BTC: 1M7MKFdwwrDqqowMUkrCXKhcEi7a16pwWy
Nathan
Mossy
*
Posts: 5088



View Profile Email
« Reply #40 on: September 13, 2012, 01:50:54 AM »

The title should be changed I cover the broader subject the conversation has evolved to. This would be easier for lurkers and new members to understand and be enticed to click on this thread
Logged

KarjamP
Mossy
*
Posts: 3684


Meet Miijam!


View Profile WWW Email
« Reply #41 on: September 13, 2012, 05:10:47 AM »

I intended to talk about using Neural Networks.

Convince me harder.
Logged

Meet Bodyless!

3DS friendcode: 4210 - 4681 - 1626



Join Dropbox!

BTC: 1M7MKFdwwrDqqowMUkrCXKhcEi7a16pwWy
Nathan
Mossy
*
Posts: 5088



View Profile Email
« Reply #42 on: September 13, 2012, 07:50:34 PM »

You first intended to talk about genetic algorithms if you can recall. The subject then went to nueral networks and now learning by watching. Since a broad amount of info has been covered change the title. These posts are hurting the thread so this is my last "convincing session"
Logged

KarjamP
Mossy
*
Posts: 3684


Meet Miijam!


View Profile WWW Email
« Reply #43 on: September 14, 2012, 03:19:50 AM »

I didn't talk about "Learning by watching". LeafBarrett did.

If I see a reason, I'll change it.

I changed it because I saw neural networks are better than genetic algorithms alone (especially when it comes to Spelunky).

In the mean time, I intend to talk about useing neural networks in Spelunky.

Besides, neural networks can use "Learning by watching" as a learning algorithm. Tongue
Logged

Meet Bodyless!

3DS friendcode: 4210 - 4681 - 1626



Join Dropbox!

BTC: 1M7MKFdwwrDqqowMUkrCXKhcEi7a16pwWy
Nathan
Mossy
*
Posts: 5088



View Profile Email
« Reply #44 on: September 14, 2012, 10:01:56 AM »

I didn't talk about "Learning by watching". LeafBarrett did.

If I see a reason, I'll change it.

I changed it because I saw neural networks are better than genetic algorithms alone (especially when it comes to Spelunky).

In the mean time, I intend to talk about useing neural networks in Spelunky.

Besides, neural networks can use "Learning by watching" as a learning algorithm. Tongue

Well some of us would like to talk about other AI methods than neural networks. The best combination for spelunky in my opinion is a combo of all three
Logged

Pages: 1 2 [3] 4
  Print  
 
Jump to: