Sep 2, 2020 12:07
Thanks, i'll see if i can incorporate your suggestion and see how it performs :)
Aug 31, 2020 12:06
I have a bot that can quite accurately estimate (from around turn 10) the turn number when the current race will finish. However i cannot seem to use this information to yield a benefit. Intuitively I would have thought i could use this information to change the rate of energy consumption to ensure that the bot finished with maximum distance on the predicted turn should give an advantage over other bots, but it doesn't seem to in practice... Any other ideas i could use this information for?
Aug 31, 2020 12:00
@TheNumberOne I have just submitted a bo t (Compensator) that "just" beats steady. There is not much in it however :P
 

 Gold Collectors KoTH(s)

For the Gold Collector KoTH, and upcoming Gold Collectors KoTH...
Aug 15, 2018 23:23
@RedwolfPrograms thanks for hosting this koth. I had fun.
Aug 15, 2018 12:36
how will the results be presented? will you be listing the relative ranking of the entrants or just the bot that wins?
Aug 15, 2018 12:35
hope your house is cold because it will soon get warm performing all those rounds :)
Aug 15, 2018 11:26
@Night2 does not really surprise me, path finding is never a cheap especially when i don't really know java script well :(
 

 Formic Functions

A place to discuss the Ant QotH: codegolf.stackexchange.com/qu...
Jan 20, 2018 03:42
@GNiklasch looks like i re-introduced the spawn on queen bug that was fixed a while back... that is what i get from cut and pasting via email between home and work
Jan 18, 2018 11:18
Updated fire fly to use the new counter. while it allow counting up to 372, i have currently set the period to 50 game ticks. It is only a minor improvement as it still is very susceptible to interference.
Jan 17, 2018 12:53
Yep, i had thought about using a worker of a dedicated type for orientation purposes, but i ended up eventually favouring the dedicated colour as the worker is better used for food collection and loosing orientation is not a catastrophic event as it can be detected and rectified. It would mean loosing count to some unknown position but it is not critical that the counter is perfect: either the counter will be too quick or too slow but will eventually hit the max value and reset anyway
Jan 17, 2018 12:48
i learn new things every day... boustrophedon is not a term i have encountered before.
Jan 17, 2018 11:40
and cell colour range 0-6 (0-indexed)... the eight cell colour is used by my queen for determining orientation
Jan 17, 2018 11:34
Note: the above is for a 3 cell counter
Jan 17, 2018 11:33
LSD = (MSD is even and NSD is even) or (MSD is odd and NSD is odd) ? ((count %49)%7) : 6- ((count %49)%7)
Jan 17, 2018 11:31
NSD = MSD is even ? (count %49)/7 : 6- (count %49)/7
Jan 17, 2018 11:29
MSD = count / 49
Jan 17, 2018 11:28
Incrementting the counter will follow the rules:
Jan 17, 2018 11:26
The pseudo code is converting the gray-like n-ary code to an integer (0 indexed)
Jan 17, 2018 11:25
LSD - Least Significant Digit, i.e. colour in cell 3
Jan 17, 2018 11:24
NSD - Next Significant Digit, i.e. colour in cell 2
Jan 17, 2018 11:24
MSD - Most significant digit, i.e. colour in cell 1
Jan 17, 2018 11:24
Where:
Jan 17, 2018 11:23
}
Jan 17, 2018 11:23
}
Jan 17, 2018 11:23
    count = MSD *49 +(6-NSD)*7 +LSD
Jan 17, 2018 11:23
{
Jan 17, 2018 11:22
else
Jan 17, 2018 11:22
}
Jan 17, 2018 11:22
    count = MSD*49 +(6-NSD)*7 + (6-LSD)
Jan 17, 2018 11:22
{
Jan 17, 2018 11:21
if (next significant digit is even)
Jan 17, 2018 11:21
{
Jan 17, 2018 11:21
else
Jan 17, 2018 11:21
}
Jan 17, 2018 11:21
}
Jan 17, 2018 11:21
     count = MSD*49 + NSD * 7 + (6-LSD)
Jan 17, 2018 11:20
{
Jan 17, 2018 11:20
else
Jan 17, 2018 11:20
}
Jan 17, 2018 11:20
    count = MSD *49 + NSD *7 + LSD
Jan 17, 2018 11:18
{
Jan 17, 2018 11:18
if (next significant digit is even)
Jan 17, 2018 11:17
{
Jan 17, 2018 11:17
if (most significant digit is even)
Jan 17, 2018 11:17
I have not yet implemented it, however i believe the logic is sound:
Jan 17, 2018 11:16
The main idea to start counting down the least significant digit (cell) when you reach the limit of the least significant digit and have thus incremented the next significant digit. Of course, this solution will require that the queen maintains orientation.
Jan 17, 2018 11:14
I have however believe i have derived a "gray-like" code from first principles, it is not probably novel... but i my google-fu failed me and i could not find a solution that i could adapt to my purposes.
Jan 17, 2018 11:12
as the queen has no memory that i just painted the first cell of the "10" code.
Jan 17, 2018 11:12
Yes exactly like GNiklasch has mentioned, i need a gray-like code for use in n-ary symbol dictionary (i.e. the 8 colours allowed) as only one cell can change per game tick, so going from say 7 to 8 using 8 colours (zero indexed for convenience) in the standard n-ary coding would be going from a code of "7" to a code of "10" thus needing two steps to colour two cells. In fact would require more: 3 cells or use of another worker to ensure that the queen knows to perform the second cell paint
Jan 16, 2018 08:23
@GNiklasch :42277756 I am not really sure how to make a "gray-code-like" encoding when using non-binary atoms, i.e. the 8 colours per cell. However i think i can sacrifice a cell to be a orientation cell so will allow the use of the three remaining cells to encode 0 to 373 using 7 colours across 3 cells (7*7*7) using a simple radix encoding. That should give enough range to tune the spawn rate