Author Topic: Toy Planet: candidate for DB3?  (Read 4768 times)

Offline Ammeh

  • Queen of the Internets
  • Moderator
  • Bot Destroyer
  • *****
  • Posts: 169
    • View Profile
Toy Planet: candidate for DB3?
« on: May 23, 2013, 02:02:05 PM »
For my final year project for university I was given the title "Toy Planet" with the brief that I was to create some sort of a-life simulator. My tutor suggested I just build a straight up genetic algorithm with a population of animals and veg, and measure the tendency for particular schemata (alleles, basically) to evolve.

I thought that idea was boring, so I built a simulator capable of simulating agents with "dna".  The dna was a string of characters of any length which acted on a simple 10-item stack, performing basic conditional jumps (jump if greater than, jump if not zero, short jump etc.), setting a state (veg, eat, mate) and moving up/down/left/right. I allowed the mutation rate of individual agents to be mutated itself, and sought to prove that evolved mutation rate is a function of dna-repair costs and sustained biodiversity. In the paper itself, I actually messed that up, but after I'd submitted it I figured out why, and actually managed to get exactly that result :D

Anyways, in a lot of ways it's similar to Darwinbots, which is why I bring it up. Not only will you guys probably be interested in playing with it, but also I specifically designed it in a modular fashion so that huge changes to the processing of DNA, physics etc would be very easy.

What this means is that there currently exists a framework which can very easily be modified to incorporate the best features of Darwinbots, with much cleaner code, and native cross-platform support (it's in Java). Also, the networking stuff is already set up because the university let me run it on their distributed computing rig :3

I can't release it yet because I have to wait for marking to finish, but there's some info and a live sim that you can view at http://www.ameliapollard.co.uk/EvoSim/.

Any thoughts on this as a potential candidate for DB3?


Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4476
    • View Profile
    • DJ Paul Kononov
Re: Toy Planet: candidate for DB3?
« Reply #1 on: May 23, 2013, 02:35:01 PM »
look beast, definitely interested in playing around with the actual program.



Quote
Any thoughts on this as a potential candidate for DB3?

Well, not really. Numsgil has been spending a lot of time designing very complex system with 4 point polygons and fluid dynamics. Most of it is over my head. However, a lot of the concepts you describe Numsgil wants DB3 to have. Anyway, Numsgil should be able to clarify further.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Toy Planet: candidate for DB3?
« Reply #2 on: May 23, 2013, 04:41:15 PM »
Probably not, but maybe some parts can be integrated. Current DB3 project is made in Microsoft Java(C#) so I don't think porting stuff would be too hard.

..but I got to play around with Toy Planer to actually say something informed about it.  ;)
« Last Edit: May 23, 2013, 04:46:06 PM by Peter »
Oh my god, who the hell cares.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4476
    • View Profile
    • DJ Paul Kononov
Re: Toy Planet: candidate for DB3?
« Reply #3 on: May 23, 2013, 05:49:17 PM »
'Microsoft Java' , funny

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7685
    • View Profile
Re: Toy Planet: candidate for DB3?
« Reply #4 on: May 23, 2013, 10:58:33 PM »
Shasta also made an alife program a while back for school.  See this thread.

I'd let you take the DB3 moniker except I do actually plan on finishing eventually  :blueblob:  Plus I think you should pursue your own "brand" anyway.  That way you aren't forced in to any sort of conceptual pigeon holes and can make the simulation work like you want.  For instance it sounds like your universe exists as a uniform grid with bots living inside grid cells?  But I always considered the actual physics engine behind Darwinbots one of the unique elements that makes it so distinct and cool.

We can set up a sub forum for it here on these forums once you can release it, though.  I don't mind at all giving hosting resources to other ALife sims.

Offline Ammeh

  • Queen of the Internets
  • Moderator
  • Bot Destroyer
  • *****
  • Posts: 169
    • View Profile
Re: Toy Planet: candidate for DB3?
« Reply #5 on: May 24, 2013, 10:22:50 AM »
That's pretty cool of you, thanks :)

Yeah, after Botsareus posted, I had a dig around in the DB3 source code. I hadn't realised how much of it was already in place. I would like to re-register my interest in helping you develop that BTW.

To be honest, if I were to go down the route of separate project I'd undoubtedly want to steal some ideas from DB. The physics are pretty awful in mine, primarily because my tutor flat out forbade me to implement Newtonian mechanics, and told me to use naive physics instead. It's definitely on the to-do list to rewrite the whole physics/collision detection engine to be more realistic. I was even toying with the idea of making it 3D.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7685
    • View Profile
Re: Toy Planet: candidate for DB3?
« Reply #6 on: May 24, 2013, 12:10:15 PM »
Yeah, after Botsareus posted, I had a dig around in the DB3 source code. I hadn't realised how much of it was already in place. I would like to re-register my interest in helping you develop that BTW.

I always like help :)

Quote
To be honest, if I were to go down the route of separate project I'd undoubtedly want to steal some ideas from DB. The physics are pretty awful in mine, primarily because my tutor flat out forbade me to implement Newtonian mechanics, and told me to use naive physics instead. It's definitely on the to-do list to rewrite the whole physics/collision detection engine to be more realistic. I was even toying with the idea of making it 3D.

You could probably grab a physics engine and stick it in without much effort.  I'm sort of insane (insane? who said that!) and like to build stuff from scratch, but there's something to be said for actually having something that runs.

3D would definitely be cool.  Hard part is how you visualize it, I think.  I toyed around with the idea of making DB3 3D, but it changes the flavor of everything dramatically, and I thought it would make it less approachable.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4476
    • View Profile
    • DJ Paul Kononov
Re: Toy Planet: candidate for DB3?
« Reply #7 on: May 24, 2013, 03:29:01 PM »
Quote
I would like to re-register my interest in helping you develop that BTW.

Sammeh, if you plan to contribute to DB, I think we need a working version of IM. I don't really care if it is p2p or not; I just want this thing to work because it is a really cool feature and my knowledge of the internet is pretty much 'hyper text prepossessing' only. (although, I did write some LAN code a while ago for school.)

I am sure that Numsgil will not mind because then he can stick this kind of code directly into DB3 as long as we code it in VisualStudio2010.

Offline Ammeh

  • Queen of the Internets
  • Moderator
  • Bot Destroyer
  • *****
  • Posts: 169
    • View Profile
Re: Toy Planet: candidate for DB3?
« Reply #8 on: May 24, 2013, 05:14:13 PM »
Quote
I would like to re-register my interest in helping you develop that BTW.

Sammeh, if you plan to contribute to DB, I think we need a working version of IM. I don't really care if it is p2p or not; I just want this thing to work because it is a really cool feature and my knowledge of the internet is pretty much 'hyper text prepossessing' only. (although, I did write some LAN code a while ago for school.)

I am sure that Numsgil will not mind because then he can stick this kind of code directly into DB3 as long as we code it in VisualStudio2010.

If I can figure out DB2's code (my coding skill has improved over the last 3 years :P ), I could potentially hack the network portion of Toy Planet into it, though I'm not sure. I'll take a look over the weekend, see if I can put something together.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4476
    • View Profile
    • DJ Paul Kononov
Re: Toy Planet: candidate for DB3?
« Reply #9 on: May 24, 2013, 07:07:01 PM »
oh, You do not need to touch the vb6 code really. The vb6 is already putting out the .dbo (robot) files into the 'outbound folder' and excepting any files coming in trough the 'inbound folder.' All you really need to do is write a plugin that excepts the following command line sequence:

Code: [Select]
iq = Chr(34) & Teleporters(i).intInPath & Chr(34)
    oq = Chr(34) & Teleporters(i).intOutPath & Chr(34)
     s = "DarwinbotsIM.exe" _
     & " -in " & iq _
     & " -out " & oq _
     & " -name " & IntOpts.IName _
     & " -pid " & Str(GetCurrentProcessId())
     IntOpts.pid = shell(s, vbNormalFocus)

(s is the sequence itself where DarwinbotsIM.exe is the program name)

I have already coded up 'local IM mode' (LocalDBIM) to test this feature, look for it on SVN. However, I did improve the 'saverobotbody'/'loadrobotbody' algo. (there where some multibot issues I had to work trough) so if we do need to test it we need to use version 2.45.03Beta.

Offline Ammeh

  • Queen of the Internets
  • Moderator
  • Bot Destroyer
  • *****
  • Posts: 169
    • View Profile
Re: Toy Planet: candidate for DB3?
« Reply #10 on: June 29, 2013, 08:52:25 AM »
So I just got my marks back from my degree. I got a first! :D

Anyways, this now means I can release my final year project, so I proudly present: EvoSim  :happy:

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4476
    • View Profile
    • DJ Paul Kononov
Re: Toy Planet: candidate for DB3?
« Reply #11 on: June 29, 2013, 02:46:49 PM »
Skill: x86 Assembly, nice.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4476
    • View Profile
    • DJ Paul Kononov
Re: Toy Planet: candidate for DB3?
« Reply #12 on: June 29, 2013, 02:52:18 PM »
hmm...

Can not seem to find a .exe download. Do you have one? If so, where?

Offline Ammeh

  • Queen of the Internets
  • Moderator
  • Bot Destroyer
  • *****
  • Posts: 169
    • View Profile
Re: Toy Planet: candidate for DB3?
« Reply #13 on: June 30, 2013, 05:19:18 AM »
It's in Java. If you just download the source there's a file called "runme.bat" that will start everything running.

Offline Ammeh

  • Queen of the Internets
  • Moderator
  • Bot Destroyer
  • *****
  • Posts: 169
    • View Profile
Re: Toy Planet: candidate for DB3?
« Reply #14 on: July 02, 2013, 10:08:55 AM »
Also, it's probably worth noting that by default the population module is disabled. If you just open up config.ini (in wordpad, because linux style newlines), then change
Code: [Select]
[Modules.populateModule]
enabled=false

to

Code: [Select]
[Modules.populateModule]
enabled=true