Author Topic: Angular unit enhancement  (Read 2574 times)

Offline Kargoneth

  • Bot Neophyte
  • *
  • Posts: 2
    • View Profile
Angular unit enhancement
« on: November 26, 2006, 12:04:02 PM »
One of my main problems is that 1256 angles gives so few perfect divisors

Choosing 1080 angles would give you a lot more options (and it's fairly close to 1256).

360 has 24 divisors
1256 has 8 divisors
1080 has 32 divisors
36000 has 72 divisors
54000 has 112 divisors

I know this would totally screw most bots up, but it would be very useful for things like the triangle multi-bot and others...

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
Angular unit enhancement
« Reply #1 on: November 26, 2006, 12:30:06 PM »
I hear you, but....

1256 was chosen because it is (close to) 2*pi*200.  Even though bot DNA is integer based, they can do 'single' arithmetic.  That is, values only get converted back to integers when they are put back into the bot DNA.

1256 3 div .aimdx store

really does turn you to 418.6666.  It's just converted to 419 when you read .aim next cycle.

I could add the operator PI pretty easily if people wanted.....

But I think we are going to move away from absolute turning operations pretty soon anyway.
Many beers....

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Angular unit enhancement
« Reply #2 on: November 26, 2006, 12:51:50 PM »
Actually, I like the idea of 1080.  It maps to degrees very well (Degrees are more familiar to most people than radians), and as he says there are more divisors.  Also, 1080 directly equals 0, which can't be said for 1256 and 0.

Divisors aside, I had the following idea: adding sin and cos to the program would allow for some simple trig operations I was working on.  Most functions in the program give and accept values very close to the range [-1000, 1000].  If we make the range [-1000, 1000], and the domain as close to this as possible, we can have cyclic nested cos and sin, which should help random DNA matain the nrg level of the original number.

Basically I'm trying to match up the spread of the domain and the spread of the range to the same interval.  If as many sysvars as possible map to and from the range [-1000, 1000], I think we'll have a higher probability of mutations successfully combining sysvars.

In the end, there are alot of changes I want to make that break backwards compatibility.  What I'll probably end up doing is building a new DNA specification that the various ideas I'm playing with can go to.  Old bots will still run the same, but the nw specs will contain new features, and bots will have to include something like DNA2 at the top of their DNA files, or something like that.

I'll keep this under my hat for that.