Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Ayumi, Quad, PeWi), 488 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 5 1 2 3 4 5
[GA experiment] "The Village" #172379
12/11/07 22:17
12/11/07 22:17
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Well, i just started working on a genetic algorithm experiment or whatever
There won't be any kind of fittness just die or to survive which is kind of real natural selection.

What i gonna do is to create a village with max. 400 villagers.
Each villager has an own job, an own way of living (when doing what), a hobby he likes the most, a familie (housemates or however you call it), gender (male female) and an individual look (hair, clothing).

I will not generate random genes (except for the look) at the beginning, so they are at first all the same fintie state machines.

Each villager has its own phenotypes and genotypes and some jobs or whatever are recessive or dominant ( http://en.wikipedia.org/wiki/Mendel ). Which is in my opinion a more realistic way of simulating people ^^

The GA will even include when he does what and at which point he is going to eat to prevent him from dying.

With the job the family gets money and so they can buy food for themselfes, then someone has to mkae the food ready to eat, so they can eat it
And it is nearly the same with water: They have to buy it and drink it ^^

One important thing is that they can't buy water if nothing is in the store, so the jobs will have an affect on the hole village.

So those are the states:
Play -> hobby
Work -> job
Sleep
pray (in church)
meet friends
eat
cook
drink
buy food
buy water
make love ( )

Jobs:
Watergetter
farmer
nothing
merchant
thief (rare)

Skills which affect the health
fun
thirst
hunger
sleep

Each bot will have its own personal assets in the genes so for someone they like it easier to fall in love with them

Now i just finished the 2D-world script to display everything an now i am working on th e pathfinding... I think i may post a demo of the pathfinding stuff tomorow so you can play a around with one npc

Now i am tired and want to sleep so here is a screenshot

and here a world bmap i used


Have fun
Omega

EDIT: Damn i forgot one thing, they can get better in their jobs by reading books, so they will earn more money

Last edited by DerOmega; 12/11/07 22:18.

Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: [GA experiment] "The Village" [Re: Puppeteer] #172380
12/11/07 22:50
12/11/07 22:50
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Looking forwards to your results, I dont recall anyone actually developing along these lines so it would be fantastic to see it done.

Re: [GA experiment] "The Village" [Re: Nems] #172381
12/11/07 22:51
12/11/07 22:51
Joined: Jan 2007
Posts: 1,565
innsbruck, austria
achaziel Offline
Serious User
achaziel  Offline
Serious User

Joined: Jan 2007
Posts: 1,565
innsbruck, austria
omega, sei mir nich böse, aber wieviele projekte haste nebeneinander laufen??

jaja, ich weiss, ich bin selber nich besser. lol


Yeah, but... Who is Lu?
Re: [GA experiment] "The Village" [Re: achaziel] #172382
12/11/07 23:29
12/11/07 23:29
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
two suggestions:

make a fittnes function, based on the amount of "needs" beeing fulfilled.
For example:
no hunger/no thirst = 50%
having a falimily life = 20%
having a good job =20 %
having religious bonus (praying) = 10%

this way, the villagers will be selected at not just surviving by eating and drinking,
else there is not selection-pressure to do the other things.


Also you should not use a pathfinding (the village know how to reach the locations automatically)
Else the simulation will get quite slow, and thus the evolution is progressing quite slow.

The pathfinding could be developed by seperate genes is a seperate simulation.

Re: [GA experiment] "The Village" [Re: Damocles] #172383
12/12/07 01:03
12/12/07 01:03
Joined: Jun 2006
Posts: 96
Straight_Heart Offline
Junior Member
Straight_Heart  Offline
Junior Member

Joined: Jun 2006
Posts: 96
@Damocles

Why should pathfinding be a seperate simulation? Its no different than the states he has already given the villigers beforehand, its part of the basic building blocks of viligers. So if you want to create an algorithim on the fly for pathfinding, you will end up with lots of dead viligers in the beginning, which make them not viligers but more simple bacteria. Since they are viligers I assume they are given these things beforehand.

I dont know if you should necisarily stay away from Pathfinding unless you can make it very efficient with a small amount of nodes/tiles.

I dont quite understand the whole GA reason to make a simulation like this. Everything is still predictable, if only just different colors and different attributes in later generations, unless my scope is nearsighted. If so could you explain what is possible for later generations?

Could natural born leaders emerge from the village? Could they learn to use weapons and train an army from young men? Could they work collectivly to research new technologies?


You're not as unique as you think you are, try again.
Re: [GA experiment] "The Village" [Re: Straight_Heart] #172384
12/12/07 01:14
12/12/07 01:14
Joined: Jan 2003
Posts: 4,305
Damocles Offline
Expert
Damocles  Offline
Expert

Joined: Jan 2003
Posts: 4,305
I suppose the pathfinding is some kind of finding a way
from tile xy to another tile xy.
And the village having more than 10 tiles in x and y direction.

Evolving a pathfinding without any "precoding" of how
it should work will use huge amounts of "evolution-time"


The simulation would take forever to bring meaningful results
(especially if the fittnes function is just live or die)
-> the first hundret thousand of generations would simply die, trying
to find any meaningful path to move on.

"you will end up with lots of dead viligers in the beginning"
exaclty that. But how are you supposed to select the fittest then, if
everyone is making sonesense. Evolution needs not just mutation, but also selection.
But selection means that there is are at least two parts, a good and a less good (bad).
If everyone is bad, there is not much to select.


GA can do lots of things, but the simulation must allow
the GA to solve that in a reasonable time.

Evolution is a type of search algorythm, where selection is the heuristic (evaluating
the quality of the direction) and mutation is the progression-step in the search.

-> roughly translated to A* : the "selection" is the heuristic
determining if the next step is a lower eucledian distance than the previous,
and "mutation" is the step going to another node/tile.
A* can remember past moves, but evolution forgets them at each new step.
So you need at least a heuristic to keep a senseful direction.


Re: [GA experiment] "The Village" [Re: Damocles] #172385
12/12/07 03:49
12/12/07 03:49
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Quote:

two suggestions:

make a fittnes function, based on the amount of "needs" beeing fulfilled.
For example:
no hunger/no thirst = 50%
having a falimily life = 20%
having a good job =20 %
having religious bonus (praying) = 10%

this way, the villagers will be selected at not just surviving by eating and drinking,
else there is not selection-pressure to do the other things.




Maybe i should make a fittnes function but not exacly like that, because for example not everyone has to work (but can) some women may stay in the kitchen cooking and buying stuff so the men could work and earn money for the family which is some kind of team-tactic and so requires a fittnes function which awards such a behavior.

Quote:


The pathfinding could be developed by seperate genes is a seperate simulation.



I think this is not really necessary, because this is not about simulating most stuff via GA it is about trying if could use GAs to simulate individual lives of villagers in my "real" game and there i won't solve the pathfinding via GA too

@ achaziel:
Is ja für mein richtiges Projekt Abgesehen von dem arbeite ich halt noch für jemanden anders aber sonst wars das eigtl Nur arbeite ich halt atm an vielen Stellen meines Projekts...


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: [GA experiment] "The Village" [Re: Straight_Heart] #172386
12/12/07 03:53
12/12/07 03:53
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline OP
Expert
Puppeteer  Offline OP
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Quote:


I dont quite understand the whole GA reason to make a simulation like this. Everything is still predictable, if only just different colors and different attributes in later generations, unless my scope is nearsighted. If so could you explain what is possible for later generations?

Could natural born leaders emerge from the village? Could they learn to use weapons and train an army from young men? Could they work collectivly to research new technologies?



No, they won't form an army to dominate our world The GA reason is simply not just making the villagers better, it is too about simulting individuals and not just "cloned" FSMs


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: [GA experiment] "The Village" [Re: Puppeteer] #172387
12/12/07 04:17
12/12/07 04:17
Joined: Jun 2006
Posts: 96
Straight_Heart Offline
Junior Member
Straight_Heart  Offline
Junior Member

Joined: Jun 2006
Posts: 96
arent they just cloned FSMs with just "copied then altered" variables from their parents?

The villigers do get better as you say. So the first generation men would for example be very bad at fishing, and as they make childeren and generations, the kids would be experts at fishing right? But they wont be able to make their own pastimes or recreations, since every activity is premade. Wouldnt just a simple copy and paste from Dad's hairline and add a random number be enough?

Im not just talking about your game so dont take offense, but I'm talking about these simulations altogether. Everything in the end is still predictable, and if its truly emergent, then it might crash the computer.


You're not as unique as you think you are, try again.
Re: [GA experiment] "The Village" [Re: Straight_Heart] #172388
12/12/07 05:00
12/12/07 05:00
Joined: Feb 2006
Posts: 2,185
mpdeveloper_B Offline
Expert
mpdeveloper_B  Offline
Expert

Joined: Feb 2006
Posts: 2,185
this seems to be made with rpg maker xp, and this could possibly be interesting


- aka Manslayer101
Page 1 of 5 1 2 3 4 5

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1