Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Numsgil

Pages: [1] 2 3 ... 22
1
Darwinbots3 / Bot testbed
« on: April 01, 2017, 11:32:48 AM »
Okay, at long last, I have completed the first iteration of my bot testbed.

What is it?
A simulation with a single bot in it.  This is a very simple base I'm going to use to build more features on top of.

The single bot is a star shaped polygon.  It has "spindles" arranged around its nucleus.  The bot can control the length of these spindles using its DNA.

So far the only features implemented are the spindles.  It can't reproduce or move or do anything else but change its shape.

Overview
It's multithreaded (to a point) with 3 core threads:

  • UI - The UI thread handles button clicks and the like.
  • Simulation - The simulation thread handles running the simulation, running the bot's DNA, etc.
  • Render - The render thread is in charge of drawing the graphics.
Importantly these three threads are independent.  The simulation can run at 10000 cycles/sec and the graphics can run at 5 FPS.  Or the simulation could run at 10 cycles/sec and the graphics could run at 60 FPS.

If one thread crashes, it should largely not cause problems for the other threads.  The simulation thread can continue running in the background if the render thread crashes (as long as it's not frame locked), and vice versa.

Read the DNA help
The DNA langauge that Darwinbots3 uses ("Sunweaver") is similar but distinct from the language in Darwinbots2.  Make sure you read through the Sunweaver manual under the help menu to understand it.  If you want to suggest changes, the raw text for it is here.  Just send me any changes you make to that file.

Help me out
My mission for you guys, if you're willing, is to mess around with this testbed to create bots that do cool things.  Specifically I'd like some bots that move in a way that looks like they're swimming, because I want to try adding fluid to this testbed next, and I want to see if a swimming motion can produce forward motion.

Also, I want to make sure that there aren't any bugs.  If you find crashing bugs, you will get an exception dialog box.  You can see what it looks like by forcing crashes (look under the 'debug' menu).  Copy+paste the exception dialog text and post it here and I can try and reproduce the issue on my side.  Unless you know why it crashed, of course, and it's not a bug. 

Or if you find the interface weird, or have just general comments, please let me know.

What's next
I'm going to start experimenting with adding fluid to this simple testbed.  I'd like to verify that it's possible for bots to swim by manipulating their shapes.

(Edit: Nov 2017.  New version uploaded)

2
Off Topic / Personal news
« on: March 03, 2015, 03:11:24 PM »
Hey everyone, if you've been curious what I've been up to the last 6 months, I've changed jobs and now work for Google as a programmer, as of last week.

I've been busy and stressed from the whole process (in a good way), and haven't really worked on anything code related for DB3 in that time.  I'll probably miss my Sept 2015 goal for DB3 by a fair number of months.  I'm trying to get back in to a rhythm with it, but I don't know when that will happen exactly.  Also going forward, I think any contributions I make code-wise will technically be owned by Google, and they'll just license it to the Darwinbots project under the MIT license.  I still need to wrangle with Google legal around that point, but Google has well established channels for this sort of thing, so I don't anticipate any issues.  Part of that means I probably can't contribute to DB2 source code at all, since it's licensed under Carlo's license.  But not like I was doing that anyway :P

On the plus side, I get a small amount of cash to use for advertising anything I want on AdWords as a company perk.  So I might start advertising for Darwinbots for search queries around artificial life and programming games and the like.  If people would like to submit ideas for what keywords it would make sense to advertise against I'm all ears.

Otherwise I don't think it will really affect anything.  Just FYI for what's going on, as I've been running kinda dark the last few months.

3
Darwinbots3 / One year plan
« 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:
  • A GUI and graphics.  Superficially similar to DB2 in many ways.
  • Basic robots that can swim around, reproduce, and run DNA.
  • A simple fluid model.  So when I say swim around, I mean swim around.  Bots and debris near each a moving bot will be moved by its wake.  Bots can move the fluid in such a way to produce a "sucking" force to pull in food, that sort of thing.
  • An editor to make writing DNA easier (thanks Panda)

What it will almost certainly have:
  • Robots that can change their shape - There's going to be some limitations, but the current thought is that bots will basically have a body made up of uniformly sized "panels", that together form the outer hull of a simple polygon.  They can't change the length of these panels, but they can change the angle between them.
  • A combat system.  - To gain energy from another bot, bots can either completely engulf another, digest the other externally (by secreting digestive enzymes) and "drink" the enzymes in, or attach themselves and siphon energy out.  Engulfing will probably be the primary means of digesting matter.  You'll probably want to be sure it's dead first, though.  Defenses to the above I'll need to think through, but it will probably be somewhat similar to DB2 in the end.
  • Chloroplasts - Something related to the surface area of the bot (to model respiration) and the amount of exposed area in contact with direct light (using a simple ray tracer to detect occlusion).  I don't have a good idea about the exact details yet.

50/50
  • Shapes/substances - That is, inorganic "things" in the world that bots can carve chunks out of.  The stuff the shapes are made out of will probably be necessary for photosynthesis and/or to synthesize some of the things that bots need to grow.  Inorganic remains from dead bots can "fuse" together to form new shapes.

What it probably won't have (but might)
  • Physics - Specifically, bots bouncing off of and not penetrating each other.  I have some really clever ideas for how to make the physics behave robustly enough to build large towering multibot structures, but fleshing that all out is going to take a good bit of work.
  • Multibots - No physics also means no multibots.
  • Multithreading - Everything's set up to be multithreaded, but making it actually work is a different matter.
  • SIMD support - For those that don't know, all modern processors have an instruction set that can operate on 2, 4, or more floating point numbers at a time.  C# doesn't really support this, but Microsoft is currently working on changing that.  There's also a library called Yeppp! that provides SIMD primitives that map pretty closely to how a lot of my code is currently set up.  But either case takes time that I might not have to spend.
What it definitely won't have
  • Internet mode - I want to try and be more clever about how IM works in DB3 than what happens in DB2 right now.  At the very least, I'd like to revisit the way that teleporters work and see if there's a better way.  But that will require a better idea of how physics and multibots in DB3 work, which requires physics to be working.  Plus, there's a lot of infrastructure that needs to be built on the server to make this work, which is out of scope for what I can really done in the next 12 months.
  • Speed - The core algorithm at the heart of everything is going to be fast for what it is, but it's going to scale poorly.  You might only be able to run ~100 bots at any reasonable speed.  A different algorithm is entirely possible, and I sort of kind of know how to do it, but it's realistically several months of work.

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.

4
Darwinbots3 / Programming task (DNA editor)
« on: May 13, 2014, 04:24:05 PM »
I have a more-or-less stand alone project, if any coders are interested.

I'm starting to work on the GUI side of DB3.  I'd like a more-or-less full featured code editor for DNA.  There's a pretty slick code editor around that we can probably leverage: ScintillaNET.

The task is to take that as a starting point and create an IDE for DNA.  Something that I could integrate in to DB3 itself, but also run as a stand alone program.

If anyone's interested in tackling this as a summer programming project let me know and I'll help get you started.

5
Off Topic / Hey Shu
« on: November 19, 2013, 08:07:52 PM »
Saw this kickstarter and thought it looked interesting. 

http://www.kickstarter.com/projects/jasonrtbond/hey-shu?ref=banner

Basically an ecosystem simulation but dumbed way down to work as a casual game.  They're assuming to release it as a free to play game.   I backed it for a few bucks.

6
Darwinbots3 / MOVED: Toy Planet: candidate for DB3?
« on: July 30, 2013, 03:23:01 PM »
This topic has been moved to Toy Planet, it's own forum!

7
Darwinbots3 / Collision detection tests
« on: July 26, 2013, 04:52:56 PM »
I'm working on collision detection for physics right now.  I've redone the basic underlying algorithm, and as a result a lot of the old tests I have, while still useful, aren't fully testing what I need them to test.

If anyone has any time and interest in helping out, I basically need a whole suite of tests updated, and maybe some new ones written.  You can see the current tests here.  The old tests are only testing for the first intersection after some time, but the new algorithm finds all the intersections in an interval of time simultaneously, and I need to update the tests to reflect that.

I need tests that test each different part of a motion (linear velocity, linear acceleration, angular velocity, angular acceleration, that sort of thing), and there's a certain amount of combinatorial complexity that makes writing all the tests kinda a pain.

I can walk through it in more detail if anyone is interested.  I'll probably do it myself sometime in the next two weeks if no one volunteers, but I'm sort of dreading it.

8
Darwinbots3 / Fluid preview
« on: July 09, 2013, 04:32:02 AM »
It's been about 5 years since I started serious work on DB3.  I currently have about 100K lines of code and not a great deal to show for it...  nevertheless, to mark the anniversary I've decided to release one of the more graphic experiments I've been toying around with.

The attached EXE is the test application I've been using to test fluid.  It has a spinning square that moves back and forth, and little particles (circles) that react to the fluid-like forces that the box imparts on the surrounding fluid.  There are 1000 particles and 24 'panels' (which are the cyan/yellow rectangles on the brown square around the edges.  They're all that the fluid simulation actually knows about).

You can use left click+drag to move the camera around.  The mouse wheel will zoom in and out. 

There are three buttons to control the speed of the simulation.  Pause is obvious, 'single step' will take a single simulation step forward in time.  'Frame lock' will cap the frame rate at 60 FPS.  If you uncheck that box, it will go as fast as your computer is able.  The 'reset' button on the bottom will warp everything back to the starting positions.

The core simulation is running single threaded, but the UI and graphics are all on separate threads, which is something that's important to me for DB3 so I've been experimenting with how it'll work.  At the moment it's kind of hacked in there, but it works.

For the record, this is against revision 953 in the SVN repository.

...

Also, be sure that you've downloaded and installed the latest DirectX runtime: DX Runtime.  It needs to be at least June 2010.

9
Darwinbots3 / Hardware survey
« on: April 03, 2013, 05:46:37 PM »
I've been playing with performance for DB3 recently (benchmarks mostly to figure out what sort of CPU budget I have to work with if I want reasonable sim sizes to run at reasonable rates), and also considering buying a new computer, so it seems like a good time to talk about hardware.

My plan right now is to get some hexcore monstrosity and something like the Titan GPU, half for games and half for DB3, and build DB3 to target that hardware specifically.  There'd be a dumbed down version that ran straight C# and would work on any machine, but for any real sims you'd need to be running on something similar.  Which would mean AVX and double-precision DirectCompute.  Both technologies are only supported in very recent hardware, though.  For AVX, you'd need either a Sandy Bridge or later Intel processor (so Q1 2011) or a Bulldozer or later AMD (Q3 2011 or later).  For Direct Compute, you'd need a card that ran at least DirectX 11, which means cards from about Nvidia Geforce 400 series or later (Q1 2010).  And it would need to support double precision, which not all cards do (I can't find hard data on which cards do and don't).

So, what sort of machines are people running now?  What sort of rigs do people expect to have in, say, 2-3 years?  Would anyone be willing to splurge on an insane machine if it meant they could run large Darwinbots sims?  Basically I don't think I have the time/interest to support more than one hardware platform, so I'm looking at supporting the high end of the current hardware market and hope that when I actually finish, the hardware is more common.

But if no one is going to have a machine like that even a few years from now...  I'll still probably do it, but I'd feel bad about it :)

11
Darwinbots3 / Boolean memory
« on: February 25, 2011, 09:11:24 PM »
I'm playing with the idea for bots to have a memory array of booleans in addition to the one for integers.

I suspect most people wouldn't care either way, but I have two different ideas for how this would work in DNA; if anyone has any compelling ideas for which one to choose, etc. I'd like to talk this through.

Idea 1:
If 'store' is storing to a negative location, it pops a value from the boolean stack instead of the integer stack and stores it in boolean memory.

Example:

true -10 store would store 'true' to the 10th element of the boolean memory array.

Pros: No additional commands
Cons: The behavior of store, as far as whether it pops the boolean stack or integer stack, is not immediately evident in all cases, since you have to figure out the sign of the top value of the integer stack when the store command is called.

Idea 2:
A separate command stores to the boolean stack.  Maybe:

true 10 flag (here, flag is being treated as a verb with it's definition which means "to signal")

Pros: It's easier to link up boolean sysvars that might control a specific integer's behavior, since they can share the same address.  It's a stupid example, but if there were a "Launch X ICBMs" sysvar, you could have the corresponding number in the boolean array control whether the command should be obeyed or not.  Eg: true .icbmlaunch flag 10 .icbmlaunch store.  I can't think of any real sysvars we'd want to do this for, but an idea anyway.

Also, we can add extra commands that don't necessarily make sense for the integer array.  Things like "toggle", which would turn that memory location to its reverse.  Likewise, right now the DNA module doesn't have inc, but it we added it, it only makes sense for an integer array.

Cons: More commands (whether that's bad or not depends on your perspective, though, I suppose).

...

Anyway, the main reason I'm thinking about this is that we could add a "waituntil" command to the DNA that would cause the executing chromosome to abort execution of the DNA until a certain boolean memory location were true.  Then, when the boolean memory location is true again, it can resume from that location in teh DNA.  Makes it possible to build DNA scripts meant to run over several cycles, like a high level instruction set for building a multibot.

Also, some sysvars are inherently boolean in nature and it's not always easy to think of a continuous version that makes numbers from [-9999, 9999] meaningful.  Vision, for instance.  .isBot is just more intuitive than some sort of coded type system (1 = bot, 2 = shape, etc.)

12
Biology / Evolution of DNA
« on: February 23, 2011, 05:14:32 PM »
I found this interesting site about the evolution of DNA (and life).  It has an interesting take on it, using language that I've never seen used this way before (differentiating "coding" regions of the DNA and "scripting" regions, which I hadn't ever thought about).

I'm going to read through it and mine it for ideas.  Others are welcome to do the same.

13
Off Topic / Sticky Feet
« on: September 22, 2010, 07:58:47 PM »
Clicky

At the risk of losing of castration I haven't gotten to peek at this really in depth yet (I'm at work, boss sent me the link, but warned me not to peek at it during work if I value certain body parts ;) ).  But looks like a fun idea.

14
Off Topic / Starcraft 2
« on: August 17, 2010, 07:51:05 PM »
Anyone else playing in the leagues?  Other than a guy at work I don't know many people who are playing competitive matches online.  I'm only in silver ATM, so I'm not exactly stomping noobs if someone wants to pick it up   :closedeyes:

15
Darwinbots3 / Visual Studio Integration
« on: June 23, 2010, 06:50:11 PM »
Something I said in another thread got me thinking:

Basically, I think it would be possible to integrate with Visual Studio for writing bot code.  I don't know if we could set up a debugger or not, though.

Just putting this here so I won't forget.  Not something I'll be working on in the near future.

Pages: [1] 2 3 ... 22