PDA

View Full Version : [Video] Polyworld: Using Evolution to Design Artificial Intelligence



edg3
03-11-2010, 04:31 PM
The Google Tech Talk video (http://www.youtube.com/watch?v=_m97_kL4ox0)

Its a very interesting talk on artifial intelligence, not your average "joe the sailor has to follow the player around", but rather more focussed on other awesome stuff. Some things:

PolyWorld: modeling intelligence the way nature would, open source program (http://sourceforge.net/projects/polyworld/) and video of it in use (http://www.youtube.com/watch?v=nWH64f8rc64)
focuses on behaviour and design to achieve a behaviour.


I so want to apply some thoughts to this to AI when I make a game that requires interesting behaviours (perhaps I will some time within the next year), but essentially, this is a great introduction to building advancing/evolving AI.

Evolution
04-11-2010, 10:17 AM
.

Evolution
04-11-2010, 11:33 AM
.

dislekcia
04-11-2010, 12:10 PM
This sort of AI has been around awhile now. Basically you have an input, filter, and an output. You decide what the inputs are, and what the outputs it can select from. The filter is a mesh of nodes, depending on past experience, and programming it makes a decision on what the output should be. Weight gets established to certain criteria, and effects what the best decision should be.

You know, you could have just said neural network like the guy doing the presentation did. Well done on the needless complexity there, I'm sure it sounded great tho :)

I haven't finished watching the entire video (watching in bursts between work), but as far as I can see, the main idea seems to be all about using evolutionary principles to evaluate neural networks. This is sort of a big deal when it comes to typical NN usage: Mostly they're applied as a single network that's given a problem set with a known bunch of "best" outcomes or responses; The NN starts with random weights and is then trained to respond to the inputs from the problem set so that the general outputs match the the desired outputs. Then the NN is set free on wider inputs and people see what comes out of it.

Unfortunately this approach means that the NN has to be constructed by the programmer: How many nodes per layer, how many layers and how many inputs vs outputs are all decided on in advance and can have quite a large effect on the final usefulness of the resulting network. Too many nodes means the NN simply overtrains and "learns all the correct outputs per input by heart". Which is probably what you were trying to talk about in your last paragraph. Too few nodes means the NN can't really differentiate between input types and is generally pretty daft as a result.

AI was my favorite subject at uni, very nearly did honors in it. One of the big things that I kept trying to do was to apply genetic algorithms to NN back-propagation and construction. I wanted to have NNs that had generations, competition and selection. The biggest problem with this was simply processor time: My first simulation had to run for 2 weeks before it returned any sort of useful results. The training load per NN structure on top of testing different back-propagation algorithms on top of testing the NNs themselves for fitness really took a ton of time per generation. It was interesting as **** tho, which is why I'm keen to finish watching this video :)

Evolution
04-11-2010, 12:47 PM
.

dislekcia
04-11-2010, 01:04 PM
I was explaining the differences between NN AI and the real thing. NN uses allot of cpu time, and as you said requires too much adjustments to make it get proper output, and is difficult to use in game development, unless they are designed to perform a certain purpose. It's interesting, but only useful in a limited space. Programs, programming themselves sounds even better. The ability for it to change the way it works sounds more beneficial. Or even have a program create smaller programs which perform certain tasks for it quickly.

That's totally not what I said at all. I was talking about multiple generations of NNs all having to go through training and then a fitness function as part of a wider evolutionary system took up a ton of time - when I tried it. I said nothing about the usefulness on NNs for game development - your points don't make much sense: All NNs are built for a specific purpose, hence them being trained; NNs are also prime candidates for calculation on a GPU, you could handle a ton of different NNs in 2-3 passes of a single 256x256 quad simply because simple NNs are invariant once trained.

I get the feeling you're not really trying to understand what you read, just find the odd keyword to comment on :(

Evolution
04-11-2010, 01:18 PM
.

dislekcia
04-11-2010, 01:59 PM
Who said it was about what you said, I was just talking for myself.

The part where, a few posts up, you used the words "as you said".


Even with GP GPU you can't do very complexed calculations, and it still has to be very restricted to perform a certain task otherwise it will take too long. In games you need it to do allot of things, and you might not have that time. This is Game.Dev I thought everything is about game development here. I just find it not that useful in game development ;)

How is handling the summation of weighted inputs NOT something that a GPU is capable of doing extremely fast? Mind explaining what it is about NNs that you think makes them unsuited to running on GPUs? Also, what AI problems have you had to solve in games so far? NNs are specific, yes, but that doesn't make them entirely useless. Spacehack used a very simple set of NN-like principles to mix together batches of defined ship behaviors in semi-random ways.


PS: not everyone knows what an NN is so I explained

Generally it helps to actually name the thing you're defining when you supply a defintion. You didn't mention the words "neural network" at all in your first post. Also, supplying a widely accepted name for an alg or technique is often better than going into the entire definition: People are smart, they can google a term they don't immediately recognise.

Evolution
04-11-2010, 02:47 PM
.

dislekcia
04-11-2010, 03:46 PM
First you say "I get the feeling you're not really trying to understand what you read, just find the odd keyword to comment on :( ", then you go around and say "The part where, a few posts up, you used the words "as you said"." which I was only referring to the part about making adjustments, not your whole post.

Except I didn't say anything about adjustments ;) NNs solve certain types of problems, do those problems come up in games? I reckon so. Sure, 90% of the time you'd have to pre-train them, but I don't understand why you're so against their use when relevant.


I doubt that you into engine programming, as you say don't reinvent the wheel, so don't talk about performance to me, I won't even waste my time proving you wrong.

Great example of dodging the question there. I did ask why you thought NNs weren't doable fast on the GPU, so feel free to prove me wrong. I promise you'd only be wasting your time if you were actually just talking **** - how else are total neophytes like me supposed to learn otherwise? ;)


Another time you contradict yourself is when you say "You know, you could have just said neural network like the guy doing the presentation did.", then in the next paragraph you give us a description.

Wha? Where did I describe NNs, specifically? I was talking about my own pokes at marrying NNs and GAs. You can nitpick all you like, but you're not making too much sense here :(

Necrolis
04-11-2010, 08:35 PM
this reminds of some of those genetic based SC (http://www.cs.xu.edu/~fairfield/evocomp/) and SCII (http://www.wired.com/gamelife/2010/11/genetic-algorithms-starcraft/) AI's.