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 ... 506
1
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.

2
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.

3
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.

4
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.

5
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.

6
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 :)

7
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.

Quote
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.

8
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.

9
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.

10
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.

11
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).

12
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,

13
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).

14
Darwinbots3 / Re: Bot testbed
« on: April 05, 2017, 02:22:02 PM »
seems to make mine crash from the start :/

Bleh, mine too.  This seems to have exposed quite a number of different bugs.  Give me a few days or weeks to fix it.  In the mean time, if you go to your Documents folder, and find Darwinbots3, and rename or delete .lastexit.lua, you can sort of "factory reset" things.  Then, if you start the Bot Testbed again, set the number of spindles to 120, and copy+paste the DNA I showed, it should work.

Quote
For finite loops, I'm not sure you need code for that, you can just make repetitions of DNA to loop with any checks needed. Then it prevents easy setting up of huge loops, and shows truly how long a bots DNA is.

I'm not sure exactly what you mean.  Do you mean just copy+paste the code over and over and get rid of loops entirely?  Although they come with a lot of baggage, I think allowing some simple looping will make for some interesting evolution.

Quote
Will bots be able to stick to things, like ties do in DB2, and will they be able to stick to "shapes" or such?

Yes, eventually, but I don't know how it will work yet.  Probably the vertices of the bot's polygon, the ends of the "spindles", can form anchors against other bots and shapes in the environment.  But I probably won't have springy ties like in DB2.  The bots themselves, since they can change shape, can act as the springs for most multibot type things you'd want to build.

Quote
are shapes going to be reworked at all, perhaps being able to have some extra properties of their own like buoyancy or mass (allowing pushing of shapes by bots)?

Yes they'll be reworked.  One of the archetypes I'm working towards is an "ant" bot that can make colonies by digging out shapes.  Probably also, in addition to nrg, bots need some physical substance (ie: nutrients) to grow that they can only get from shapes.  From some light research, it seems a large part of why rain forests are so biodiverse is that they're energy rich but nutrient poor, so I want to be able to simulate that.

I'm not sure of the specifics yet, but my thought is basically that when a dead bot decays, it leaves behind inorganic blobs that can float around in the sim.  Blobs that touch each other stick together, so over time blobs will combine together to form larger and larger shapes.  Something like that.

15
Darwinbots3 / Re: Bot testbed
« on: April 05, 2017, 05:07:27 AM »
Ellipses are hard, haha, but I managed it.  Set this to 120 segments:

Code: [Select]
{rdiv swap div }
{square dup mul }
{gulp 0 store } ' clear out the integer stack by one element
macro rdiv @rdiv
macro square @square
macro gulp @gulp
const a 500
const b 501
const theta 502

' Ellipse equation is
'                         a * b
' ------------------------------------------------
'  sqrt( (b * cos(theta))^2 + (a * sin(theta))^2 )
{ellipse
.b
.a
.theta
*theta cos *b mul square
*theta sin *a mul square
add
sqrt
*a *b mul
9999 mul
30 mul
rdiv
} gulp

120 { dup
9 mul ' Get in range [0, 1080]
' cos 0 max 1000 add ' Not an ellipse but interesting!
5 3 @ellipse
swap store } loop

There's probably a much simpler way to get an ellipse, but I don't know it!

Note that this will crash the renderer at around 60 bot segments.  I've already made a note of it.

Pages: [1] 2 3 ... 506