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.

Messages - Numsgil

Pages: 1 2 [3] 4 5 ... 508
Darwinbots3 / Re: Bot testbed
« on: April 27, 2017, 05:29:36 PM »
Looks good but I think shadowgod still has you beat :)

If you can figure out under which circumstances it bugs out that would be good.  It's possible it's a bug in the program that I should fix.

Suggestions / Re: GPGPU acceleration?
« on: April 27, 2017, 05:16:27 PM »
Executing the DNA isn't really well suited for GPUs, unfortunately, since each bot has to run its own DNA on its own data.  Getting the physics to execute on GPUs is possible in principle but rarely done in practice.  Probably only shots are really suited for GPU calculations, but we just don't have enough shots in a typical sim to outweigh the upfront CPU cost of transferring things to/from the GPU.

Yes, I think it's a reasonable approach and yes, it was one of the plans for a while.  It needs server side support, either PHP or python or whatever, and I'm not really a web programmer so I didn't know how to do that.
 There's also security concerns and I'm not enough of a web programmer or linux guy to know what is or isn't a good idea here.  I'd want to jail the custom server side code as much as possible so it can't break things and can't be used as an entry point to attack the server.

Darwinbots3 / Re: Bot testbed
« on: April 12, 2017, 08:03:16 AM »
Where'd 9600 come from?
Anyway, 9000 seems a pretty nice value.

Okay, I might just go with 9000, even though I think 9600 is better in a lot of ways, since 9000 is both a round number and evenly divided by 360, which should make math easier for humans.

In terms of where they come from: the prime factors help to determine how many different ways you can divide up the full circle evenly.  3, 4, and 6 are important, since triangles, squares, and hexagons form a full tesselation of the plane, and are the only regular shapes to do so, so you need some multiple of 12 at least (the lowest common multiple of 3, 4, and 6).

If you ever wondered why there's 360 degrees in a circle, it's because it's the closest round number to 365 in base 60 (which was the base the Sumerians used thousands of years ago).  Their number system was base 60 because it makes math easy: 60 divides cleanly in to all sorts of different divisors.  For Darwinbots, we have a similar requirement.  The more ways there are to divide the circle in to even parts, the more different symmetries are possible, or at least easy.  The prime factors show you the raw ingredients to combine to divide the circle up.

2 is an important prime factor, because splitting things in to halves, or quarters, or sixteenths, etc. are very natural ways to break things apart, and can easily mimic the way cells in biology cleave in half during reproduction.  3 is important, but multiple copies of 3 aren't so much: being able to split things in to thirds and being able to represent 30, 45, and 60 degrees is important, but being able to represent 40 degrees or divide things in to 9ths isn't very important.

Sunweaver is sort of built to be base 10, to make math easy for humans, so 5 is an important factor in so far as 10 is.

But 7 isn't an important factor.  It would let you split circles in to 7ths, but there probably isn't much call for that.    As the prime factors get larger, they become less useful.  About the only use 101 would be for is if the bot had 101 segments.  Otherwise there's not much call for splitting a circle evenly in to 101 pieces.

So generally speaking finding a good number is balancing the needs for 2, 3, and 5 as prime factors, taking up as much of the [0,9999] range as possible, and making it easy for humans to do the math.

Darwinbots3 / Re: Bot testbed
« on: April 10, 2017, 05:47:23 PM »
They take units in whatever forms a full circle (as of this moment, that'd be 1080), and convert them in to degrees (so in this case, divide the values by 3), then run sin/cos on them.  Normally the results of sin and cos are in the range [-1, 1], but they get scaled so it's easier to make use of them, up to [-1080, 1080].

So for example, 90 degrees would be 360 units in Sunweaver.  Sine of 90 degrees is 1.0, so 360 sin would return 1080.

Darwinbots3 / Re: Bot testbed
« on: April 10, 2017, 10:32:29 AM »
How about one full circle = 9000 units.  That's 360 degrees * 25, which gives prime factors of 2^3, 3^2, 5^3.  And it's relatively easy to remember.  By comparison, 9720 gives prime factors of 2^3, 3^5, 5.

Another option is 8640, which is 360 * 24, which has prime factors 2^6, 3^3, 5.  Not as easy to remember as 9000, but lets you split the full circle in to 64 equal slices instead of just 8, at the cost of not being able to slice things in to as many 5ths.

Yet another option is 9600.  That's not a multiple of 360 degrees, but it does have a lot of nice dividers.  Its prime factors are 2^7, 3, 5^2.

Darwinbots3 / Re: Bot testbed
« on: April 09, 2017, 02:08:32 PM »
I meant because I'm fixing all the crashes you're posting, you end up finding novel ways to break things each time.  Definitely post all your crashes.

Darwinbots3 / Re: Bot testbed
« on: April 09, 2017, 10:15:46 AM »
Okay, new binary at the top that fixes all the render crashes you've posted so far.

If it's any consolation, I'm adding all the crashes you find to a big testing framework so each crash you find is some completely novel way of crashing things :)

Darwinbots3 / Re: Bot testbed
« on: April 09, 2017, 07:57:08 AM »
i have me a crude swimmer :D finally..

Ah, it's pretty sweet :)  I haven't started with fluid stuff yet (fixing all the crashes you've been finding), but soon.

Quote from: spike43884
Do 9900 perhaps as it's a multiple of 180 (which is half of 360) -> 55*180 = 9999

Problem is you can't represent 45 degrees if 360->9900 (since 9900 doesn't divide evenly in to 8 parts), and that's a fairly important angle.

Also, I can't imagine you using 9999 memory locations (though, I may be wrong) so if you then made it so memory locations greater than 9900 (those which can't standardly be selected by cos/sin) as custom memory locations, for people to store their own data in (including epigenetic locations?) - 99 in most cases should be enough.

At the moment there are only 999 memory locations.  I'll probably expand that to 9999 at some point, but point is don't confuse how many memory slots there are (999) with what values they can store ([-9999, 9999]).

At some point I'll reserve a large contiguous memory block for user use.  At the moment I'm not sure how many sysvars I'll need for normal bot stuff yet, so I don't want to jump on to segmenting up the memory just yet.

Darwinbots3 / Re: Bot testbed
« on: April 08, 2017, 07:29:26 PM »
Oh, I've also uploaded a new version.  Change list and new binary at the top.

Darwinbots3 / Re: Bot testbed
« on: April 08, 2017, 07:20:04 PM »
I'm not against changing the range, as long as it's a multiple of 360 (so the mapping to degrees is easy).  How do people feel about mapping [0, 360] degrees to [0, 9720], since the max range of memory is 9999?  I wouldn't want to go higher, even though the stack has 9 digits, since you couldn't store the result easily in memory.

Darwinbots3 / Re: Bot testbed
« on: April 08, 2017, 02:33:36 PM »
Okay, fixed that render crash too.  New version is at the top of the thread.

Darwinbots3 / Re: Bot testbed
« on: April 07, 2017, 05:52:43 PM »
I've uploaded a new version at the top of the thread (A01330) that fixes the render thread crashes.  If you notice any more, send them my way (note you can copy+paste from the exception dialog if the repro is awkward).

Darwinbots3 / Re: Bot testbed
« on: April 06, 2017, 11:35:41 AM »
Bleh, sorry, I guess I need some better testing around the high level stuff.  I'm going on vacation soon, which means I'll either get a lot of programming done or none at all, so I'm not sure what sort of timeline for a fix would look like,

Darwinbots3 / Re: Bot testbed
« on: April 06, 2017, 04:30:41 AM »
also how do you read the memory of a location like this:

120 { dup (get memory of said location, modify it) swap store } loop

You can use the ref command like so:

Code: [Select]
120 { dup ref 5 add swap store } loop

(I'm pretty sure that bot memory is saved between frames, but I saw an issue recently that made me question that assumption.  It was something I tested once a long time ago but haven't tested recently.  If it seems like memory is cleared every frame, let me know).

Pages: 1 2 [3] 4 5 ... 508