Darwinbots Forum

Code center => Darwinbots3 => Topic started by: Numsgil on September 01, 2014, 01:48:06 AM

Title: One year plan
Post by: Numsgil on September 01, 2014, 01:48:06 AM
I've been saying off and on that I'd like to aim for a summer 2015 release for an early version of DB3.  I think I'm in a good place to hit that, if you're willing to call mid to later September 2015 summer :).  The timeline is maybe a little aggressive, but I'd give 2:1 odds that I can get something together in the next year that will be actually interesting to play with.  Most of the pieces are there, so it's just a matter of gluing everything together and working out the issues that come along with that.

First, the scope of what this first release is going to be:

What it will definitely have:

What it will almost certainly have:

50/50

What it probably won't have (but might)
What it definitely won't have

Once an initial version is released, I'll try to polish it and generally make it work as a simple version of Darwinbots.  Then, to that, I'll start adding back in pieces I haven't finished yet, while trying to get feedback from the community about how things work and what sort of priorities different things should have.

In order to build anticipation, I'm going to try and keep a dev blog of sorts in this thread.  Post screenshots when I have something worth showing, that sort of thing.
Title: Re: One year plan
Post by: Numsgil on September 01, 2014, 02:09:51 AM
So, for the first dev blog type post, I'm going to share what I've been working on for the last few months:

Implementing lsqlin (http://www.mathworks.com/help/optim/ug/lsqlin.html) in C#, in a way that's efficient.

It doesn't sound very exciting, but it's really important for fluid and bots changing shape.  It's also what the Physics will use to solve constraints and contact points.  Most importantly, it's what will let all three systems (fluid, physics, bot shape) work together consistently, without producing any problems (https://www.youtube.com/watch?v=rqSuqrWYFqY).

The solver I'm working on uses a Complete Orthogonal Decomposition (http://www.roguewave.com/portals/0/products/legacy-hpp/docs/lpkug/8-3.html) and needs to update a QR decomposition, so I've been working on those over the summer.  I've finished with them, and run them through a rather aggressive suite of tests, and things look good.  Importantly they are very memory and cache efficient, so I should be able to get performance out of the solver that's better than Octave (an opensource Matlab clone).

I'm going to put them together in to the final lsqlin algorithm, and then I'll be done with this part (hopefully).  I expect that to take me another month maybe to code up and test.

Once that's done, my plan is to combine it, my graphics engine, and the code for DNA to produce a simple app to try out changing and controlling robot shape.  My obstacles there will be ensuring that the robot roughly maintains its total area and doesn't self intersect itself, and how best to actually control the shape of a robot from DNA.
Title: Re: One year plan
Post by: spork22 on September 01, 2014, 03:39:16 AM
So there could be bots that utilize jet propulsion for movement in a similar fashion to squids or jellyfish?
Title: Re: One year plan
Post by: Botsareus on September 01, 2014, 11:06:42 AM
Thanks for the problems link Numsgil. I was loling for a good minute.
How far did you get with Box2D?
Title: Re: One year plan
Post by: Numsgil on September 01, 2014, 05:09:55 PM
So there could be bots that utilize jet propulsion for movement in a similar fashion to squids or jellyfish?

Yep, that's my hope.  Tricky bit will be whether that form of locomotion requires certain fluid properties or not.  I'm trying to get away with only simulating certain aspects of fluid, for performance.  (Specifically, I'm hoping I can get away just using the Biot Savart law (http://en.wikipedia.org/wiki/Biot%E2%80%93Savart_law), and don't need to add in any other terms (viscosity, vorticity) to get interesting fluid-like effects).

How far did you get with Box2D?

All existing physics engines I'm aware of don't do what I want them to do, Box2D included.
Title: Re: One year plan
Post by: Botsareus on September 01, 2014, 05:11:04 PM
I'll keep that in mind learning Unity.
Title: Re: One year plan
Post by: MysticalDumpling on September 02, 2014, 10:36:48 AM
This sounds exciting...
Title: Re: One year plan
Post by: Botsareus on September 02, 2014, 10:44:47 AM
You are awesome Dumpy, I have not understood your true nature until now.
Title: Re: One year plan
Post by: Botsareus on September 02, 2014, 03:07:28 PM
And before Numsgil goes angry on me. Yes I do think DB3 has potential to be cool. If he can figure out the collisions model to be fast, it is way better motion algorithm then current. Too bad it is completely over my head.
Title: Re: One year plan
Post by: Peter on September 02, 2014, 03:29:25 PM
What's the difference between lsqlin and QP? (http://en.wikipedia.org/wiki/Quadratic_programming)

Also why roll your own. Something this  (http://msdn.microsoft.com/en-us/devlabs/hh145003)one ought to include something useful.
Title: Re: One year plan
Post by: Numsgil on September 02, 2014, 06:35:45 PM
Lsqlin is basically a QP, but not all QP are Lsqlin.

Most solvers I've seen for lsqlin turn the problem in to a QP and solve it that way. But that's not a great way to do it, for both performance and robustness reasons.

There might be some reasonable packages for it in python or fortran, and possibly for C, but C# is sort of the red headed step child for numerical packages.

The Microsoft package you linked looks like it's more aimed at data scientists than what I'm doing. It might be able to do what I want it to, but my guess is it's built to solve problems in a more general way than what I need or want.

This sort of thing sits half way between the academic world (with bad open source solutions) and the data science world (with commercial packages aimed at noon real time uses, and all that implies).  I don't know of any thing like BLAS or LAPACK for optimization problems, for instance.
Title: Re: One year plan
Post by: Botsareus on September 02, 2014, 07:14:54 PM
The main problem I am seeing is people just do not get it. I bet you show the matrix (from the movie, add mutating dinosaurs) on a computer and they will simply go 'Oh, pretty colors, meh, next.' But maybe that is my family experience only.
Title: Re: One year plan
Post by: spork22 on September 02, 2014, 07:30:01 PM
I would like it  :)
Title: Re: One year plan
Post by: Botsareus on September 02, 2014, 07:32:22 PM
I would too Sporky, I would too.
Title: Re: One year plan
Post by: Moonfisher on January 09, 2015, 03:58:50 AM
I know people looove physics and all that.  But personally, for evo sims, my main issue has always been speed and multi threading (Sorta same deal).
So is there any chance there may be a mode available running really simple physics in order to boost the speed?
I'd obviously like to have good physics too, but if I need to choose between realistic physics and speed, then I would choose the latter. So personally think it would be a nice option.

Anyway if the priorities of the tasks where democratic I would be voting for multi threading and speed increasing options at the cost of realism or even heavy features or such.

But aside from that what I really want to see is a release, with the absolute bare minimum needed to release. (Graphics would be nice to have though).

I guess I could fetch the source and try it out, but can't seem to find the time in between work and drinking.

And almost forgot, huge thanks to all the people working on this, you're my heroes!
Title: Re: One year plan
Post by: spike43884 on April 24, 2015, 10:42:30 AM
I think physics can be 90% thrown out of the window for the first realeases...I mean, of course fluids requires some physics, and I actually believe you can slightly hold out on fully doing fluids...Just getting the core out there is more key.
I think the thing to charge towards mostly now is just a simple top down simulation, where a bot can just move. thats all thats needed first.
Title: Re: One year plan
Post by: MysticalDumpling on November 11, 2015, 02:39:14 PM
You are awesome Dumpy, I have not understood your true nature until now.

Thanks?