In a very similar simulation I did, I used a function: fvision. The fvision's input is a pcaked information about "how the world is" in a cercle centered in yhe tank. The output is the direction. And the problem is how the functions works ;)
nice. i'm building my own right now with java. this is some powerful shit - do you have any plans for actually applying it to solve real life problems?
@tyebillion I've made programms like that, and I used a "vision system". Obviusly each fish must scan their environment... For instance, using a function with a packed information about "how the world is" in a cercle centered in the fish, that gives a number-direction as output...
Now stay with me on this, its 2011, we can simulate evolution inside a pc.
what can we do in 3011, simulate entire worlds? Maybe galaxies or even an entire universe, can we simulate life, and even more important, consciousness? I think we can :) But... maybe this is already happening. So maybe our universe is just a simulation, and we are going to simulate a universe with people and everything inside it.. And are they going to continue this process? My mind can't handle this
ok i think i understood it now: there was a random NN (neural network) which does not change during a life period of a fish. But each new generation, just the best NN are taken and combinated and after some generations, you get an intelligent NN. Really nice way to create an intelligent NN!
I just posted a video response I created a while back. I did something similar to this but I did a comparative study of genetic algorithms and particle swarm optimization. I rewrote the engine using C# and XNA game studio.
All the details and a download link to the source can be found on my blog, found in the description of the video response.
@ailm96094 i have a similar program (except in mine they are ants :D) and I too tried to make them aware of each other. What I did was add 9 inputs, 3 for each of the 3 closest ants. In two of those 3 i input a normalized vector with the direction of the other ant relative to this ant's position, and the other input was set as the (relative) distance, i.e. the farthest of the 3 closest ants will have a value of 1 while those closer will have a smaller value... it seems to be working
I created something similar to this in garrysmod, a lot more primitive, it mainly had to do with each organism having attributes and based on those they would survive or starve. Anyways, one day i had let it run for 6 hours, when i came back (about 10000 generations later) they have maxed out all the bounds i put in.
Could be great desktop theme... simple but at the same time actions behind look ... complex. Combined it will engage interest and catch concentration.
I can see that the purpose of Genetic algorithms is to real life problems having to deal with the economy or consturction but i've always enjoyed tinkering and discovering and i'm guessing that the randomness of reproduction and the fact that not always the best with reproduce has not been taken into account in these types of simulations. have they?
@hellotoyouandmeandyo they have.. for instance in the begining they dont differ much in capacities being all virtually dumb.. however a slightly better one may not be selected because the food is ramdonly distrbuted..so a lucky worse fish can end up eating more..
I'm trying to recreate this in C# with XNA, but its not working at all and I donno why. For me eventually all the fish just start moving in the exact same way even though they are all receiving different inputs =/
@RAWRimaTroll I had a same problem. Then I realized I am sending different type of information on inputs. Position of the fish and directionto food (or something like that) seem to be incompatible. :) This helped a lot, my fish are now much more clever :D
You misunderstand the idea of NNs. They must learn themselves! GAs are used in case the subject cannot learn itself. You do not understand anything! :)
If you coded it into the NN that fish could 'see' other fish within a proximity, it would be interesting to see how they responded. Would they fight for the food, or split up and avoid potential starvation.
Hi man, I'm starting to learn about AI, Neural Networks and Genetic Algorithms. What kind of NN do you use for your fishes? what is the fitness criteria to spawn new generation? Thanks a lot man.
@alpha44890 The end of the video mentions it's based off of ai-junkie's fish tutorial demo which illustrates one of the simplest types of NN, and it looks like the fitness is the number of "food squares" touched within a set time limit each generation.
question, i like your video i was wondering if u can help me with a question i came up with an idea lets say there are two pc's ,in pc 1 there are three box's that are out putting letter from a-z box=f box=r box=w the next set of boxs box=h box=l box=x box 2 a-z box-3 a-z is it possible to see what pc 1 is out puting then take that info and manually in put it into pc 2 then could pc 2 know where pc 1 is going and what pc 1s next out put would be before it comes out
this is excellent to optimize training neural networks. thanks. plus the fish learn to swarm in schools as a survival mechanism. that's excellent. just like real fish, amazing, survival of the fittest
Hello, I have written a few evolution simulations to get the best approach for something, but have never tried programming neural nets. How do they work and learn?
I made creatures with boxes as hands which they catched food with... after a while they evolved really big hands, and other stuff which made it easier for them to catch food :)
could you make it more dynamic? i mean for example let a fish have an energy level which increases if he got a piece and decreases over time and let him spawn ancestors if he got 4 or 5 peaces and let him die if his energy level is below 0 .. i think that would be more realistic and more interesting to watch :) that way you dont need hard coded "generations".. i assume that wouldnt take much time todo..
additionally there is a very strong selection pressure if there doesnt spawn many pieces :)
i am currently writing my own evolution simulation which is pretty complex i think :) i will post videos as soon as it works and produces interesting results
can someone help me out, metivity/ai-junkie have helped explain the overall concept but i cannot find help about how to assign good traits to bits and little things like that, any sources
You can also add position of K nearest other fish, so fish could to chose direction where there isn't much competition, what do you think, about this ?
And also add position of more, then one nearest piece of food, so fish could swim, to place, where tthere is highier density of food. At the end you could compare, in one environment, this fish with extended capabilities with the simpler ones. In what programming environment did you wrote this ?
Frankly, this isn't your program. This is only a Smart Sweepers v1.0 modification. Everybody can download the original program and it's source code from ai-junkie. And it's not difficult to change the tanks to fish and modify the application's title.
how about coding in hunger and lifespan so that in one way they want to get the food to take down hunger and as hunger gets higher aggression kicks in, but if hunger is low then they drag other fish of the same colour to the food which could then increase the speed and health and lifespan of that species, helping others of the same colour could increse chance of mating, agression against fish of other colours (I swear im not racist lol) could increase as hunger does, killing = natural selection.
i downloaded a program similar to this, where ants need to return pieces of food to a bases area, it uses neural networks too and i noticed that in the beginning of your program, the fish act similarly to the ants, spinning around, and after a while they act more synchronized, amazing how they do that
make a fish eater, a bigger fish who can't eat food bits but can eat other fish, :D fish would evolve to avoid the fish eater and the fish eater would evolve to eat the better fishes
This has been flagged as spam show
In a very similar simulation I did, I used a function: fvision. The fvision's input is a pcaked information about "how the world is" in a cercle centered in yhe tank. The output is the direction. And the problem is how the functions works ;)
txikipantxo 2 months ago
Ho Yes. :) . I believe in it.
Thank you for your response.
ravivyatom 2 months ago
nice. i'm building my own right now with java. this is some powerful shit - do you have any plans for actually applying it to solve real life problems?
scuzzulus 2 months ago
So eventually they learn to chase the food? :D
Altair565 6 months ago
Yes, it is. most of it.
I played and changed the algorithm a little bit.
I also made a game of two teams, one team - predators and one prey. both evolving.
ravivyatom 6 months ago
Isn't this just the 'tank-example' with a fish picture instead of a tank?
otoparc 6 months ago
@otoparc yeah his just ripped it off
PlebScrubber 6 months ago
Fish are dumb.
AmalgamOfMeat 6 months ago
How do the fish "know" where the food is?
tyebillion 8 months ago
@tyebillion I've made programms like that, and I used a "vision system". Obviusly each fish must scan their environment... For instance, using a function with a packed information about "how the world is" in a cercle centered in the fish, that gives a number-direction as output...
txikipantxo 2 months ago
Now stay with me on this, its 2011, we can simulate evolution inside a pc.
what can we do in 3011, simulate entire worlds? Maybe galaxies or even an entire universe, can we simulate life, and even more important, consciousness? I think we can :) But... maybe this is already happening. So maybe our universe is just a simulation, and we are going to simulate a universe with people and everything inside it.. And are they going to continue this process? My mind can't handle this
timen1986 8 months ago
@timen1986 i simulated your mom's tits last night.
scuzzulus 2 months ago
Where is your god now?
AzxE10 8 months ago
How does the neural network (NN) learn? Just by always taking the best fish from one generation to the next and combinationg them?
Or does the NN also learn during a generation is alive, so that the synaptic weights are changed everytime a fish has success getting some food?
0xBEAF 9 months ago
ok i think i understood it now: there was a random NN (neural network) which does not change during a life period of a fish. But each new generation, just the best NN are taken and combinated and after some generations, you get an intelligent NN. Really nice way to create an intelligent NN!
0xBEAF 9 months ago
@0xBEAF
:)
ravivyatom 8 months ago
@0xBEAF :)
ravivyatom 8 months ago
This is WAY overly simplistic.
kdc43 1 year ago
This is really cool. What sort of "parameters" does each fish have that is randomised at the beginning, and evolved as the generations go past?
FalconPunchTheFail 1 year ago
@FalconPunchTheFail hi
The parameters are the values of the neural network that reacts to location of the food.
ravivyatom 1 year ago
I'd really like to see the new killer fish being placed among some of the more primitive ones :)
buggler 1 year ago
I just posted a video response I created a while back. I did something similar to this but I did a comparative study of genetic algorithms and particle swarm optimization. I rewrote the engine using C# and XNA game studio.
All the details and a download link to the source can be found on my blog, found in the description of the video response.
adamstirtan 1 year ago
Neat!! I have messed around with this program a little. I tried to make the "fish" aware of each other. I did this to stop the clustering.
The result was they all just stared to swim in strait lines.
I think i deed a better GA algorithem
ailm96094 1 year ago
@ailm96094 i have a similar program (except in mine they are ants :D) and I too tried to make them aware of each other. What I did was add 9 inputs, 3 for each of the 3 closest ants. In two of those 3 i input a normalized vector with the direction of the other ant relative to this ant's position, and the other input was set as the (relative) distance, i.e. the farthest of the 3 closest ants will have a value of 1 while those closer will have a smaller value... it seems to be working
VrIgHtEr 1 year ago
I created something similar to this in garrysmod, a lot more primitive, it mainly had to do with each organism having attributes and based on those they would survive or starve. Anyways, one day i had let it run for 6 hours, when i came back (about 10000 generations later) they have maxed out all the bounds i put in.
Remscar 1 year ago
Could be great desktop theme... simple but at the same time actions behind look ... complex. Combined it will engage interest and catch concentration.
reinoks 1 year ago
I can see that the purpose of Genetic algorithms is to real life problems having to deal with the economy or consturction but i've always enjoyed tinkering and discovering and i'm guessing that the randomness of reproduction and the fact that not always the best with reproduce has not been taken into account in these types of simulations. have they?
hellotoyouandmeandyo 1 year ago
@hellotoyouandmeandyo hi
They have been taken into account.
Some times the best ideas are in the weak creatures.
ravivyatom 1 year ago
@hellotoyouandmeandyo they have.. for instance in the begining they dont differ much in capacities being all virtually dumb.. however a slightly better one may not be selected because the food is ramdonly distrbuted..so a lucky worse fish can end up eating more..
132BigBoy 1 year ago
I'm trying to recreate this in C# with XNA, but its not working at all and I donno why. For me eventually all the fish just start moving in the exact same way even though they are all receiving different inputs =/
RAWRimaTroll 1 year ago
@RAWRimaTroll I had a same problem. Then I realized I am sending different type of information on inputs. Position of the fish and directionto food (or something like that) seem to be incompatible. :) This helped a lot, my fish are now much more clever :D
micmicmic7 1 year ago
@micmicmic7 haha yeah I actually just figured that out a couple days ago. My fishes are swimming very well now.
RAWRimaTroll 1 year ago
You misunderstand the idea of NNs. They must learn themselves! GAs are used in case the subject cannot learn itself. You do not understand anything! :)
valtih1978 1 year ago
This is a nice video to show beginning students.
dekalbxxx 1 year ago
If you coded it into the NN that fish could 'see' other fish within a proximity, it would be interesting to see how they responded. Would they fight for the food, or split up and avoid potential starvation.
ChrisPatuzzo 1 year ago
Generation 2400: The fish become self-aware. In a panic, they try to pull the plug.
The fish fight back.
youtert 1 year ago
Hi man, I'm starting to learn about AI, Neural Networks and Genetic Algorithms. What kind of NN do you use for your fishes? what is the fitness criteria to spawn new generation? Thanks a lot man.
alpha44890 1 year ago
@alpha44890 Hi
welcome to the real world, myte.
i used simple feed foreword NN.
The fitness is the amount of food the fish eat.
ravivyatom 1 year ago
@alpha44890 The end of the video mentions it's based off of ai-junkie's fish tutorial demo which illustrates one of the simplest types of NN, and it looks like the fitness is the number of "food squares" touched within a set time limit each generation.
horriblylongusername 1 year ago
manattan342 1 year ago
i am not sure i understand. something like pc reading the "mind" of onether?
ravivyatom 1 year ago
@ravivyatom friend is it possible for me to access this program to play a bit for the purpose of watching evolution unfold?
132BigBoy 1 year ago
@132BigBoy hi, idont think i have this code any more...
sorry friend
ravivyatom 1 year ago
@ravivyatom
cry
xinoxano99 1 year ago
@ravivyatom oh ok..shame man it is a very decently build one :(..take care
132BigBoy 1 year ago
very nice :)
5ko2009 1 year ago
this is excellent to optimize training neural networks. thanks. plus the fish learn to swarm in schools as a survival mechanism. that's excellent. just like real fish, amazing, survival of the fittest
moseskiiza 1 year ago
Im doing something like you, but with sheeps and wolves.
The more sheeps a wolf eat, the better is the wolf;
The more time the sheep stays alive, the better is the sheep;
And im not giving the relative position, once its easier for wolves/cheap learn.
PS: im using cartesian coordinates =P
Nice video, you inspired me to do this, thx :D
LordOfDragonMasters 2 years ago
Hello, I have written a few evolution simulations to get the best approach for something, but have never tried programming neural nets. How do they work and learn?
AlexBraith 2 years ago
Also, could you provide a link to downlaod your software? Thanks.
AlexBraith 2 years ago
Nice programming :) I've made a few like this too!
PaXx 2 years ago
Thanks,
What kind of applications?
ravivyatom 2 years ago
Evolution simulators,
I made creatures with boxes as hands which they catched food with... after a while they evolved really big hands, and other stuff which made it easier for them to catch food :)
PaXx 2 years ago
I will love to see it :)
ravivyatom 2 years ago
Maybe I'll upload a video. :) But, I don't know how to record it :O
PaXx 2 years ago
try jing
ravivyatom 2 years ago
add them the possibility to eat eachother :D
rerere284 2 years ago
could you make it more dynamic? i mean for example let a fish have an energy level which increases if he got a piece and decreases over time and let him spawn ancestors if he got 4 or 5 peaces and let him die if his energy level is below 0 .. i think that would be more realistic and more interesting to watch :) that way you dont need hard coded "generations".. i assume that wouldnt take much time todo..
ecreif 2 years ago
additionally there is a very strong selection pressure if there doesnt spawn many pieces :)
i am currently writing my own evolution simulation which is pretty complex i think :) i will post videos as soon as it works and produces interesting results
ecreif 2 years ago
This is a great idea.
I just dont have the time for it at the moment
thanks
Raviv
ravivyatom 2 years ago
Not bad. Allow for darwinism and social interactivity between creatures and i'll be impressed.
deathfxu 2 years ago
can someone help me out, metivity/ai-junkie have helped explain the overall concept but i cannot find help about how to assign good traits to bits and little things like that, any sources
hyrulianshinobi333 2 years ago
Hey, very nice program you've made there! I have some questions, just of curiosity:
Is the learning rate fixed?
How many hidden layers are there? (and hidden neurons?)
Are you using the "momentum learning" algorithm?
cool stuff anyways!
blenderuser 2 years ago
hi, thanks
There is no learning rate because the nets are shaped using genetic algorithms.
I think it was 6 layers or something.
I didn't use the "momentum learning" algorithm, Thanks for the question, I learned something new today.
ravivyatom 2 years ago
You can also add position of K nearest other fish, so fish could to chose direction where there isn't much competition, what do you think, about this ?
plmqas 2 years ago
And also add position of more, then one nearest piece of food, so fish could swim, to place, where tthere is highier density of food. At the end you could compare, in one environment, this fish with extended capabilities with the simpler ones. In what programming environment did you wrote this ?
plmqas 2 years ago
thanks for the ideas.
its great ideas, and some of them i tried.
I just continued to other stuff...
Its in visual c++ 6.0
ravivyatom 2 years ago
Frankly, this isn't your program. This is only a Smart Sweepers v1.0 modification. Everybody can download the original program and it's source code from ai-junkie. And it's not difficult to change the tanks to fish and modify the application's title.
HelloTibi 2 years ago
no argument...
I give him the credit at the end of the clip
I added a lot more than just replacing the tanks
ravivyatom 2 years ago
Good Work, do you have any book about neuronal networks that you can recomend me?
rdglpz 2 years ago
try this one
An Introduction to Genetic Algorithms
Melanie Mitchell
ravivyatom 2 years ago
how about coding in hunger and lifespan so that in one way they want to get the food to take down hunger and as hunger gets higher aggression kicks in, but if hunger is low then they drag other fish of the same colour to the food which could then increase the speed and health and lifespan of that species, helping others of the same colour could increse chance of mating, agression against fish of other colours (I swear im not racist lol) could increase as hunger does, killing = natural selection.
MPireMallDOTnet 2 years ago
are they able to recognize other fishes ? would be interesting if they develop some kind of group behavior :)
ecreif 2 years ago
sorry just read the description.. how many neurons did you use?
ecreif 2 years ago
i did some sessions of the fish connected together.
it was very interesting.
I hope i get time to put it on.
and i dont remember the number of neurons i used...
sorry bout that...
take care
ravivyatom 2 years ago
How do you breed the fish to create new ones?
googiek 3 years ago
Did you use any learning algorithms other than Evolution?
ZirconCode 3 years ago
In this application - only evolution.
ravivyatom 3 years ago
should find a way to give them a longer lifespan in order to teach them.
rabbit4diesel 3 years ago
Haha, nice =)
kelt3we 3 years ago
This comment has received too many negative votes show
bullshit
germandream45oyla22 3 years ago
Thank you for your words
ravivyatom 3 years ago
amazing! what kind of network model did you use?
Lcalavera 3 years ago
It is a Feed Forward Neural Network.
ravivyatom 3 years ago
hey, thank you! this is really impressing!
Lcalavera 3 years ago
nice. how long did this take?
ehsanul 3 years ago
i think 2 days
ravivyatom 3 years ago
yeah
crowded house
love them
ravivyatom 3 years ago
Is this music Liam Finn?
inthefade 3 years ago
Is there any way to download this? I would love to experiment with it.
dimitriii 3 years ago
This is a simple modification from Matt Buckland's C++ source code. Instead of tanks you've used a fish shape.
fdital 3 years ago
The credit goes to Matt.
I wrote the crossover and selection methods.
ravivyatom 3 years ago
i downloaded a program similar to this, where ants need to return pieces of food to a bases area, it uses neural networks too and i noticed that in the beginning of your program, the fish act similarly to the ants, spinning around, and after a while they act more synchronized, amazing how they do that
kevin92620 3 years ago
Really interesting work, could you please tell me what parameters can evolve?
Do you already have a pre coded pile of logic that if put together would form the perfect killer fish?
Meaning you randomize what logic the fish can have and each generation the logic that suits the world best survives to the next generation?
If this is not how it is done, is it possible to explain how the logic evolves :) Hopefully I'm not asking you to break NDA
Thanks
newbielives 3 years ago
make a fish eater, a bigger fish who can't eat food bits but can eat other fish, :D fish would evolve to avoid the fish eater and the fish eater would evolve to eat the better fishes
diosilva16 3 years ago
thanks for the offer.
I have played with it.
I have done two groups of fish.
Predators and prey.
The results were interesting.
There was a trade off of evolution between the two populations.
I might make a movie of it too.
ravivyatom 3 years ago
i'd really apreciate if you did
great job
diosilva16 3 years ago 2
please tell more
does a fish have a kind of sensors to detect food?
or how he know where he have to swimm?
erzkonservativ 3 years ago
please read the info. i added some stuff.
thanks.
ravivyatom 3 years ago