@Pelle Because // Don't embarrass ourselves when things go bad plus a bunch of conditions in which spawning would be inadvisable, or am I misunderstanding the question? (I can't read Dave's mind, though. :) )
@GNiklasch Yes, I saw that comment. But isn't the search with multiple ants more effective than the queen only scrambling? Wouldn't it be more effective to spawn the first helper as soon as possible?
Ah wait, he is then not going diagonal anymore, so less effective with only one helper. So is 4 worker ants the sweet spot? The three extra food to not embarrass ourselves is to not end last on the scoreboard when the initialising goes wrong, I guess.
Again, I cannot read Dave's mind. What I can tell from looking at the code is that it makes no distinction between the queen beginning to spawn workers, and spawning workers later on, so the same quantitative threshold applies in both cases, whether optimal or not (even though the queen could use the presence or absence of the "director" ant in her view to tell which case is which). If I were to guess, I would guess that Dave simply had seen no need to bother with the distinction.
Wildfire sure starts early enough to get other players into, ehem, interesting sitatuations... ;)
The three extra food have more to do with not ending last on the scoreboard when the queen has lost touch with all non-director worker ants and would otherwise expend all the food she has on spawning new workers -- and even so she sometimes finishes with no food (e.g. as a result of crashing into other ants).
(Wildfire is among the very early entrants - the design was not based on watching and analyzing for two months what could happen to existing players...)
@GNiklasch what's the thing preventing you from adding a lightspeed-ish start? couldn't you spawn one of your helpers and, when settling down, spawn the other? Sure, it would probably require some work to implement, but you'd have an extra 1925 moves on average per game
@dzaima I would have to completely redesign, from the ground up, the two settling strategies and associated functionality in the miner functions.
The presence of one staff next to the queen is what coordinates the whole affair.
The creation of the second staff (the secretary) completes it, and triggers the transition to operating the "mines" (oh for all the mixed metaphors).
(And... Windmill != Wildfire, although I suspect the similarity in names has something to do with the similarity of avatars in trichoplax's controller...)
@GNiklasch as the queen knows when the 2nd staff needs to be made, couldn't that jump-start the transition? Maybe I'm missing something, but I'm pretty sure if the queen knows when the transition needs to happen, it'll continue knowing.
or, well the same thing as above, but for the 1st staff - if the queen knows when to start the procedure (and saves that by spawning the worker), what's preventing the queen from using that knowledge to continue continuing (based on that foodâ„8) until the 2nd staff is made?
Have you looked at the unminified Windmill.js? The code is extensively commented...
Part of the story is that ants have no memories. The queen cannot count how many workers she has made - and therefore arrangements need to be made to keep them all in place (and in the queen's view) until either the full set is present, or an intruder has blocked one of the required cells (which is theoretically possible but extremely unlikely in practice).
(The queen cannot rely on her own food counter for this - it could be larger than expected thanks to picking up more food right after the 8th; it decrements while the initial set of workers is created; and it could get down into this low range again much later when a Vampire or similar appears on the scene...)
The reason that lightspeed start works for Glider is I was able to utilize the fact that I could create Worker #1 and no other workers and minimally tweak the behavior to deal with this (as Worker 1 should not be able to see the queen when it moves normally, whereas the queen should be able to see Worker #3 or #4 normally, but won't, only seeing Worker #1: an edge case that was previously unhandled for both ants).
@GNiklasch it could be larger than expected thanks to picking up more food right after the 8th it can still be distinguished as the queen then wouldn't have both helpers; it decrements while the initial set of workers is created but the queen can add the helpers in view to her temporary food counter; and it could get down into this low range again much later but then the queen has the 2 helpers by her
imma just make a (very bad and possibly very inaccurate) prototype
(The other thing is that Windmill.js is vast and complex as it is, more than twice as long as would befit a PPCG answer before artificial minifying - I'm not going to pile on anything more unless there is a clear need and a clear expected benefit.)
@dzaima And if I were you, I'd combine a faster start with a different endgame ;) lightspeed-sliding miners!
@Draco18s Thank you kindly. I have a couple of ideas which I had contemplated in the past but not pursued, absent evidence of any need for them. I'm not planning on doing anything in a hurry now (and don't have all that much time on my hands at present either).
By the way, something funny happened vis-a-vis Dave's controller as of your latest Vampire-answer edit. In games involving all 28 players, on the very crowded arena, Vampire's average scores dropped dramatically at that point - from about 17 to less than 7. I'm not sure why and how; usually I'm not even able to find the Vampire queen in the final mess.
@GNiklasch if you click "edit entries" in the lower right, then click on Vampire, that will make only her ants get marked (and then choose pointer instead of circle)
My impression is that early accidents have become more frequent and it very rarely happens that Vampire finds any of the possible victims. (I don't see such a change on trichoplax's controller playing subsets of 16, but then I'm looking at a far too tiny sample there, couple dozen games so far.)
Or Vampire does find a possible victim, but fails to loot any food (Zigurrat, Firefly, and Black Hole are easy to mis-ID or get deadlocked trying to navigate)
Hm, with the Vampire entry clicked, I still can't find her (and have difficulties finding other things now too)... Yeah, could be something like that. I'm not attaching too much importance to it (games with 28 players aren't at all realistic for scoring purposes) - just wanted to let you know.
On a metaphysical note, the Ant QotH universe seems to have evolved to the point of genetic hybridizations among its denizens :)
-- Ah there she is (meaning the Vampire queen). (Doing this on a small laptop screen, the "edit entries" thing blocks part of the arena from my eyes...) Yep, looks like view-sized accidental color patterns (a yellow cell and a couple of black ones, or one black adjacent to one each cyan and red and black, or isolated black squares on red background when Wildfire has painted over sth containing the black ones) can keep her mesmerized for long times.
Trusting patterns which already have a record of getting their owners confused can be dangerous ;)