Author Topic: About Darwinbots3  (Read 7376 times)

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: About Darwinbots3
« Reply #30 on: April 14, 2015, 04:27:34 PM »
On the issue of the SVG getting quite large quite fast, I think it supports compression.  See SVG#Compression.  So the server could spit out a compressed stream of SVG files.  Even if we do a complete SVG file once a frame, that might be fine bandwidth-wise for the local host.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: About Darwinbots3
« Reply #31 on: April 14, 2015, 05:14:11 PM »
A uncompressed stream on localhost would be as good as compression, it would only compress it send it to the browser which decompresses it.

With the league topic in mind, it would be nice to be capable to store matches on the server and play them like a video in the browser. Apart from storage space, it would be best if the whole SVG can be properly loaded as a file at once.

A lot of the current growing SVG is due to slow moving particles(slipstream TestBed). With 1000 particles it can climb up quite a bit. A way to decrease is to keep track of particles and for example state that it moved one to the left between the 9th and the 10th second instead of each frame a small update. I'll try playing with it when I can properly can reproduce the same animation as DX9 gets.

It's actually not that far from sending out a complete SVG every frame currently. :P
Oh my god, who the hell cares.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: About Darwinbots3
« Reply #32 on: April 14, 2015, 05:38:23 PM »
Yeah I don't think storing a complete match would be that hard.  The positional data frame-to-frame has a lot of spatial coherence, so it's possible to compress it.  Either with some standard compression algorithm like gzip or with something that understands what the data is, like fitting splines to it.  It'd be nice if whatever the full match "movie" format is, a browser could load it up without any extra help.  But even if we have to write a small app to "uncompress" the stream and send that to a browser, I'm fine with that.

I guess there's two use cases to consider: a realtime viewer of what the DB3 simulation is currently doing, and an "offline" movie format that can playback a recorded stream.  For the realtime viewer you might not be able to do much better than sending a fresh SVG every frame.  At the very least I'd be interested in what sort of framerate you can get from that.  Graphics doesn't block the sim from running, so even if you can only manage 20 FPS the sim can run unhindered at 100s of cycles/sec, so that's probably good enough.  It would be a good excuse to look in to only drawing things the current viewport can see certainly.

For the offline movie format, it's a bit trickier, especially because objects can get created and destroyed over time.  But in principle I'd start with a big array and set the calcMode to discrete, and then later on we can apply some type of compression to remove elements that the different SVG calcModes could handle.  eg: if something is well modeled as a series of splines we can chuck all the intermediate values that aren't necessary to specify the splines and set the SVG calcMode to spline.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: About Darwinbots3
« Reply #33 on: April 14, 2015, 06:18:44 PM »
As this project is maturing it begins to make more and more sence to me. Some of the rendering ideas sound incredible. Also the descriptions of the collision engine and the shapes/corpse mobile shapes sounds cool.

I am mostly concerned about backwards compatibility. To the point where I am scoping out my own port of DB2 based on the Revelations Book. :P (Can not give more detail then that)

Maybe one day we can do a hybrid and keep the best of both systems.
« Last Edit: April 14, 2015, 06:26:42 PM by Botsareus »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: About Darwinbots3
« Reply #34 on: April 14, 2015, 06:44:11 PM »
It might be possible to hook in some of the DB3 modules to DB2.  It's a bit tricky because you'd have to go through COM, but it's possible in principle.  Sunweaver, for instance, could pretty much drop right in without much effort.  Blacklight would be more effort but still not too hard (the hardest part would be figuring out how to build up the data hierarchy for what to draw.  Either XML or manipulating instances of classes.  Probably XML (or something like it.  Lua code isn't a terrible data format, actually, and a bit more compact than XML)).

Not a task I ever really want to do myself, but something I'd support.

Going the other way, pulling in DB2 code to DB3, is a different story.  DB2 code is not really modular, and trying to extract out individual components from it would be self flagellation at best.  It could be made modular, but that's a massive refactor, and I don't think it could be done without introducing numerous new bugs.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: About Darwinbots3
« Reply #35 on: April 14, 2015, 06:55:17 PM »
I always wanted to make DB2 moduler. Phd thesis anyone?
What I mean is we can port settings and DNA files from DB2.
For example we can expend the memory range to 1500 to allow for newer sysvars and then have a translator that works something like

Code: [Select]
Value Memory store 'done only if Memory is not a fixed value

Into:

Code: [Select]
Value Memory 1000 modi store

Done to keep compatability where modi is a new 'mod inclusively' command.
And I even throw in Spikes NOR request if I get that far.

Anyway, just stuff I have been thinking about due to the fact I have alot of down time right now.
« Last Edit: April 14, 2015, 07:42:08 PM by Botsareus »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: About Darwinbots3
« Reply #36 on: April 14, 2015, 07:44:45 PM »
Anyway, just keep the DB2 wiki up there for a good 6 years and will see what happens. That's all for now... Have fun.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: About Darwinbots3
« Reply #37 on: April 14, 2015, 08:23:09 PM »
What I mean is we can port settings and DNA files from DB2.

At a certain level it's apples and oranges.  The two programs just won't be much more than superficially similar.  But for DNA you could use def tags and codules to pretty much mimic anything you could do in DB2, with some caveats.  But even the sysvars won't really match up 1:1, so I don't think you could automatically "port" DB2 bots to DB3.  Like, they'd "work" in the sense that the DNA would execute and store stuff in the appropriate memory locations, but it wouldn't mean the same thing it did in DB2.

Aside from bots, the physics settings will be pretty much N/A, for instance.  Z gravity and friction values won't have any corresponding things in DB3.

Quote
Anyway, just keep the DB2 wiki up there for a good 6 years and will see what happens. That's all for now... Have fun.

Realistically I don't think I'm on the verge of getting DB3 up and running any time soon.  It could be 6 years before I even get something working as well DB2 (but I'm really bad at estimating how long something will take to do so who knows).  So DB2 isn't going anywhere :)

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 386
    • View Profile
Re: About Darwinbots3
« Reply #38 on: August 09, 2016, 11:25:02 PM »
just wandering how's db3 going?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7713
    • View Profile
Re: About Darwinbots3
« Reply #39 on: August 10, 2016, 02:03:59 PM »
just wandering how's db3 going?

I'm almost done with a simple "bot testbed".  Basically a simulation with just a single bot in it where you can program its DNA.  And the only thing the bot can do right now is change its shape.  But it's a good opportunity to flesh out and test all the different sub systems together in a single app, and figure out the high level multithreading strategy to keep the UI, renderer, and simulation threads separated so if one is slow or crashes it doesn't hurt the others.  Basically it's the first "vertical slice" of lots of the features all working together at the same time.

By almost done I mean the thing I have mostly works, but I'm still polishing some of the UI and making sure when it does crash people can send me useful crash reports.  I'm hoping to release it by the end of the month maybe, but I also haven't been actively working on it the last month or so, so we'll see.

Once that's released, I want to try and add in the fluid model, so we can see if bots can swim with it or not, and I'd like to play around with phagocytosis (eating other smaller bots by engulfing them) and mitosis (splitting in half to produce two daughter bots), since they both involve how the bots change their shape and they're probably the biggest question marks in my mind.  There's also an overhaul of the DNA I'd like to do at some point (collapse the boolean stack and the integer stack in to a single stack) to make it faster and some low level architectural stuff I'd like to finish that should allow the program to scale more easily to new features.

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 386
    • View Profile
Re: About Darwinbots3
« Reply #40 on: August 10, 2016, 02:09:20 PM »
nice 8) your actually farther than i thought.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: About Darwinbots3
« Reply #41 on: August 11, 2016, 01:24:09 PM »
Finally Darwinbots will have good error reports.  :P

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: About Darwinbots3
« Reply #42 on: August 21, 2016, 05:04:40 AM »
Oh nice work nums.
It'd be nice to store a few (hundred?) more memory locations...That, and a dedicated server :P Then it won't take 5 years for botsareus to evolve something.
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
    • DJ Paul Kononov
Re: About Darwinbots3
« Reply #43 on: August 21, 2016, 09:13:56 AM »
That is a good point Spike. I never actually figured out what the ideal ratio of used and unused memory/sysvars is. In DB2 we just piled up more sysvars and hope it still worked. But tbh even with the ratio slowly shrinking over time the robots seem to evolve quite well.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: About Darwinbots3
« Reply #44 on: August 23, 2016, 10:14:12 AM »
That is a good point Spike. I never actually figured out what the ideal ratio of used and unused memory/sysvars is. In DB2 we just piled up more sysvars and hope it still worked. But tbh even with the ratio slowly shrinking over time the robots seem to evolve quite well.

I mean more for programmed bots, as more features = more sysvars needed, but its nice to have a lot of free slots (preferably in a big clump) so that you can perform complex mechanics inside your bot.

One idea as far as features go, perhaps as a replacement to in/out. I'm just guessing, here, but I suspect DB3 will have more advanced mechanics for getting food / poison etc. and it'll perhaps be more different "chemicals" (so-to-speak) which exist which are utilized, rather than a couple of *suit-all-your-needs magic arbitary compounds*. Then along with actually using them, for MB communication you could just dump some out when your in the presence of your species, to convey a message.
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.