• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
phyitbos

Evolutionary Algorithms + Neural Net

8 posts in this topic

I am trying to create a program that models simple artificial life similar to what the guy made in this video:

[media]http://www.youtube.com/watch?v=2kupe2ZKK58&list=UUYidgLlQS_D-xNcoTLb0n6w&index=17&feature=plcp[/media]

So far my program has some critters that scurry around my screen looking for food but with no "brain". I've never messed with neural networks before but have been reading up on them in books and online for the past few days. This particular case seems a bit different from your basic neural network in some aspects though.

It seems that his NN doesn't use any type of learning or error measuring, but rather it does this from the evolution of the creatures? I'm thinking that the weights are randomly initialized and that the creatures that are best fit / survive in general have their weights copied over to the next generation (with crossover and random mutation)? He says the brain consists of a directed graph where the edges are weights, and I'm guessing this is what he means?
0

Share this post


Link to post
Share on other sites
I have heard of this type of thing. More often I've heard of GAs using a simple rules-based tree where the rules get crossbred and mutated. Essentially any "brain" that can be summarised as a combination of numbers and logical operations could be cross-bred, although results may vary. Personally I think it's a waste to use NNs without using one of their major features.
0

Share this post


Link to post
Share on other sites
[url="http://en.wikipedia.org/wiki/Genetic_algorithm"]Genetic Algorithm[/url]
[url="http://www.youtube.com/results?search_query=genetic+algorithm"]Videos[/url]
[url="https://www.google.com/webhp?sourceid=chrome-instant&ie=UTF-8&ion=1#hl=en&safe=off&sclient=psy-ab&q=genetic+algorithm+in+games&oq=genetic+algorithm+in+games&gs_l=hp.3..0j0i8i30l3.1473.51425.0.51610.48.29.7.5.5.2.200.2598.21j7j1.29.0.les;..1.0...1c.1.UyVAOm2DpoA&pbx=1&ion=1&pws=0&bav=on.2,or.r_gc.r_pw.r_cp.r_qf.&fp=e144f1b25e45ee57&biw=1339&bih=1010"]Genetic Algorithms in Games[/url]
0

Share this post


Link to post
Share on other sites
if you are looking for a NN algorithm that uses evolutionary methods have a look at http://www.cs.ucf.edu/~kstanley/neat.html. There are libraries there for different languages so you can just plug your inputs in if you don't want to implement it yourself.
1

Share this post


Link to post
Share on other sites
Just a suggestion, but if you manage to get it work, you should try higher level evolution as in what benefits the society, not what benefits the individual.

Like have a few areas, with little traffic between them, and have inputs for positions and directions etc. of other beings.

So i would imagine the best societies beings would aim for food nobody else is aiming for, while the worst just go for the nearest food, slowing down their growth as they fight for food.
1

Share this post


Link to post
Share on other sites
[quote name='Waterlimon' timestamp='1349168617' post='4986001']
Just a suggestion, but if you manage to get it work, you should try higher level evolution as in what benefits the society, not what benefits the individual.

Like have a few areas, with little traffic between them, and have inputs for positions and directions etc. of other beings.

So i would imagine the best societies beings would aim for food nobody else is aiming for, while the worst just go for the nearest food, slowing down their growth as they fight for food.
[/quote]

That's interesting in that it now starts to involve [url="http://en.wikipedia.org/wiki/Game_theory"]game theory[/url] -- especially [url="http://en.wikipedia.org/wiki/Nash_equilibrium"]Nash equilibria[/url]. The problem is that "benefiting society" is really hard to codify without getting completely subjective.

One interesting note is that evolutionary algorithms will benefit society as long as you encode the right parameters. For example, if you were to rate the pieces of food not only by distance, but by proximity of other agents to it -- and then also keep track of successes and failures to acquire those items-- you will start to see agents being less competitive for the food since it benefits them to go slightly farther to get the guaranteed hit. As per Adam Smith, Nash, etc., you are still self-serving, but doing it in a way that is non-destructive to the group as a whole (via [url="http://en.wikipedia.org/wiki/Pareto_efficiency"]Pareto improvements[/url]).
2

Share this post


Link to post
Share on other sites
[quote name='Waterlimon' timestamp='1349168617' post='4986001']
So i would imagine the best societies beings would aim for food nobody else is aiming for, while the worst just go for the nearest food, slowing down their growth as they fight for food.
[/quote]

Along those lines there is also Novelty Search [url="http://eplex.cs.ucf.edu/noveltysearch/userspage/"]http://eplex.cs.ucf.edu/noveltysearch/userspage/[/url]
0

Share this post


Link to post
Share on other sites
BTW, as a follow up on the "fighting for food" and game theory bit, check out various references to the "Hawk-Dove game" and evolutionary game theory. Basic rules are:
[list]
[*]Doves will eat together
[*]Hawks scare off doves and eat the food
[*]Hawks fight other hawks -- and can't eat while doing so
[/list]
Therefore, if population is doves, it pays to be a hawk. If population is (multiple) hawks, it pays to be a dove. If there is 1 hawk, it is a toss-up, really.
1

Share this post


Link to post
Share on other sites
[quote name='IADaveMark' timestamp='1349200028' post='4986115']
That's interesting in that it now starts to involve [url="http://en.wikipedia.org/wiki/Game_theory"]game theory[/url] -- especially [url="http://en.wikipedia.org/wiki/Nash_equilibrium"]Nash equilibria[/url]. The problem is that "benefiting society" is really hard to codify without getting completely subjective.
[/quote]

Although I'd be the first to agree that the leap from real life to a game theoretic model is huge and fraught with peril, there [i]are[/i] some standard ideas about what "social optimality" means.

The idea is just:
- You have [i]n[/i] players
- Each player [i]i[/i] will choose an action; we'll call it [i]x[sub]i[/sub][/i].
- Each player [i]i[/i] gets a real-number reward, [i]r[sub]i[/sub][/i]([i]x[sub]1[/sub][/i], [i]x[sub]2[/sub][/i], ..., [i]x[sub]n[/sub][/i]).
- The "societal welfare" is the sum [i]R[/i]([i]x[sub]1[/sub][/i], [i]x[sub]2[/sub][/i], ..., [i]x[sub]n[/sub][/i]) = [i]r[sub]1[/sub][/i]([i]x[sub]1[/sub][/i], [i]x[sub]2[/sub][/i], ..., [i]x[sub]n[/sub][/i]) + ... + [i]r[sub]n[/sub][/i]([i]x[sub]1[/sub][/i], [i]x[sub]2[/sub][/i], ..., [i]x[sub]n[/sub][/i]) .
- The social optimum is the point ([i]x[sub]1[/sub][/i], [i]x[sub]2[/sub][/i], ..., [i]x[sub]n[/sub][/i]) that minimizes [i]R[/i].

The important thing is that the Nash equilibrium and the social optimum will not generally be the same point. The difference between social welfares at the two points is called the [i]price of anarchy.[/i]

The classic example is the prisoner's dilemma. Referring to this table (the first one to pop up in Google Image Search),
[img]http://www.beyondintractability.org/cic_images/aha/Game-Theory-prisoners-dilemma.gif[/img]
the Nash equilibrium is (Defect, Defect), which gives rewards of (2,2) and a social welfare of 4. But had the players chosen (Cooperate, Cooperate), they'd have gotten rewards of (3,3) and a social welfare of 6. So for this game the price of anarchy is 6-4 = 2.

If you're a benign ruler who gets to choose the rules by which your society runs, you can choose to tax certain actions in such a way (i.e., modify the individual reward functions) so that the Nash equilibrium [i]is[/i] the social optimum. The people who figured this out got a Nobel prize in economics (although in retrospect the math doesn't seem so difficult).

The extent to which these models describe the behavior of real humans is of course debatable, and is a subject of empirical study in psychology and the social sciences.
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0