Needing to tweak Vampire to handle Highway in a tournament (matching was a little too permissive, other issues). And Vampire might be overtaxed at this point.
@Alion since it sometimes steals all the food on the board, maybe "The Highway Ant"...
@eaglgenes101 Yes I'm seeing high memory usage with the ongoing cache. For now I've made the cache per game only, so no memory is kept between games. In Chromium this keeps long term RAM usage down to about half a GB but Firefox still uses over 5GB given time, so I need to find a way to fix that. Longer term I'd like to find a way to make between game caching work too, as it's slightly slower dropping the cache every game
@eaglgenes101 The cache as such cannot leak memory - it has a fixed maximum size, whether or not parts of it are being recycled. Some JavaScript runtime engines, on the other hand, seem to be prone to memory fragmentation and inefficient garbage collections under this kind of heap-usage pattern...
(And if anything, the recycling of sizeable objects would make fragmentation worse in the long term.)
Plus I have a sneaking suspicion that GCs are even less effective when there's a tournament running - since the JS runtime never finds a moment where it knows that the page is currently idle.- @trichoplax Making the young cache generation much smaller (I'm currently using 8*750 instead of 8*5000) seems to help a bit (resulting in less, or much slower, heap fragmentation - at least on my Safari).
I'm trying to find a way for Highway to start even faster right now. It mass produces workers in stage 2, but then completely leaves them for up to 1250 moves (because the Queen does a 180 when she finds her Partner, leaving 30-120 workers to wander across the entire map).
I'm not having any luck finding a solution for that, though...
I've pieced together a half-lightspeed straightening routine that makes it so all formation ants are adjacent to two other formation ants at any one time
This should remove the need to have one-neighbor recovery routines that could risk deadlocking in saboteur scenarios
@Alion Highway's likely winning. :P In my tourney with the modified Vampire, I turned off Sliding Miners (as I haven't updated miner code yet) and Vampire is keeping the Highway and Windmill suppressed (although its own score took a 3 point beating: before Highway, Vampire was up to 10.10 leaderboard points).
The main bug that's haunting Highway right now is the fact that a laden worker can shift the main rail if a part of it was erased and and the worker approached it an unfortunate angle... After I fix that, the only reason for a new main rail to appear is going to be a very unfortunate color pattern.
Highway has shaken things up way more than I initially expected (mostly because my expectations were skewed towards the harmless side because of testing older versions which did not fare as well).
Besides, as a developer, I'm more interested in going through the failure cases - I have yet to see a game where Highway gets >400 food... I should probably go do that :)
And of course, the game I found was one where it somehow spawned 7 partners...
The code that makes the Queen run whenever she sees an enemy worker is causing way more issues than I expected. I'll need to do something with this. I should create a git repo to track all of the issues this thing has (inspired by Windmill).
For now all I have is a messy TODO embedded into the highway.js as a bunch of comments, with details stored in my head. This is not a good long-term plan.
@Draco18s If I'm not mistaken, the presence of masses of workers negatively affects Glider more than Lightspeed.
Well, it borderline doesn't affect Lightspeed at all, to be precise (aside from reducing overall food available and super-rare deadlocks). Glider can get its wings clipped (although it had a lot of improvements in that departament recently, AFAIK).
Hmm... Could we somehow store replays of games? Since ants don't have access to data from previous turns, one could reliably create a snapshot of any given arena state. Things that would have to be stored: color, food and occupant of all cells, ant data (in the spawning order), frame #, how many times the random function was called. We should be golden then, right?
I went in once to display the "seed" for random games to replay them and...it was a different random system and I could not extract a sensible seed from it ;_;
Oh wow, it actually looks really scary on the real arena when it works fine. It just slowly devours the place, with pockets of attempted independence created by opponents getting repeatedly shut down and cleaned up, occasionally for good. I understand why you guys are calling it "rampant green slime" and "apocalypse by checkerboard" now...
@Draco18s I don't care about that, to be honest. First, I want to get the "Highway" to be stable against particularly intrusive entries (mainly SlM). Besides, I've already managed to build a theoretically-working vampire against a defense system significantly more sophisticated than the "null" one that's currently online. I'll have to experiment with different approaches to defense, namely confusion, to successfully counter the Vampire. If ya can't find it, ya can't drain it.
Theoretically, I could also bunker the Queen when she's got enough food, but that's going to be a last resort.
That's why I'm going to try and find something that lessens the impact the Vampire has - making Queen movement more clunky than it already is is going to turn disastrous quite quickly.
Interesting behavior: fake main rails have a sort of critical mass, where they only become destructive after a sufficient amount of workers deem it real. This critical mass, however, is fairly random.
That's also why my animations don't have the green cell (its an artifact of the queen thinking "oh I should return foreverAlone() and it never broke anything
There's actually code in there now for one of the two guide ants (3,4) to spend their NOP move coloring the queen's cell to avoid explosions
And not because of the foreverAlone code, though it came up
And why the food moves in a way that isn't possible (purely for the benefit of resetting the animation, but it's timed such that each of the ants is just taking a NOP during those frames)
@Draco18s That's slightly misleading, by the way. When I saw the food-circling animation for the first time I thought "oh lol so that was a funny bug, huh?"
Oh man, now that animation will forever trip me out.
@Draco18s I would make it like this: Glider with empty map, Glider moving towards food, Glider turning towards food, Glider grabbing food, repeat 90°, 180°, 270°.
And I think I'm happy with Vampire for the time being. I tweaked it for SlM, tossed SlM into the tournament I'm running, and after 9 instances of SlM being "in" it has a score of... 12.33
Holy crap, that's so sad. Just killing off all competition with a community wiki Vampire... I could probably almost make a case for violating the "don't team up" rule, but not really.
Hopefully that didn't sound rude, by the way. I'm just kinda... feeling weird about this whole situation. Glider is king because he's immune to Vampire, like, really? That feels wrong...
its a community wiki because Dave saw that my edits were good and that he couldn't maintain it himself. It's also not really a team-up. The rule is "Provided each answer is working solely towards its own victory" which they are. Its just that vampire's attempts at winning cause other entries to fall
Glider isn't actually immune to Vampire, it they meet (the right way), Vampre can totally leech food from Glider. It's just that there's no way to intentionally make this happen
If I could, though, I absolutely would code in a Glider targeting method. Its just that...there's no trail to follow
@Draco18s Yea, that's exactly the point I was trying to make. It's a gray line - Vampire, due to His selfishness, is causing the entire ecosystem to shift. Same could be said about Highway, or any entry for that matter, just in a lesser scale.
dammit now that I finally decided to think about an anti-vampire system I'm realizing it's more impossible than anticipated without losing efficiency :/
If I never edited Vampire to target MoaR, Vampire would have fallen into obscurity, as Ziggurat, Black Hole, and Firefly were all self-defeating strategies, making it hard to impossible to leech food from them
@dzaima Yep, that's the problem. Anything that keeps Vampire out will also wreck your efficiency
@Draco18s By the way, Firefly is self-defeating because of a bug. An unladen worker that steps for food orthogonally (so steps off the structure) will promptly erase one cell. Firefly dies when the cell erased is behind an unladen worker.
What shifted the balance (with Windmill) was that by sacrificing the "bounce out" code, I gained a greater maneuverability with Vampire queen's positioning. And because the position arrived at allowed all three rails to continue working, it became more valuable to stick around than bounce out anyway.
The current code actually will block one rail arm, but even so
Windmill's "spawn a worker next to an enemy queen" and "workers never move away from an enemy queen" meant that Vampire could NEVER have queens adjacent and worker-number-advantage, so the ability to read her food levels and bounce out was what had to be sacrificed.
(Gods, I want to add highway-banditry to Glider now...)
I want a simple solution for Vamp so badly... It ain't happening, though. And any solution I come up with is either a) nearly immediately counter, b) sluggish/paranoid/inefficient enough to be usable, c) doesn't always work.
@Alion have that fake main rail there, and on the intersection point have workers that tell the miners that ahead of them there's a piece of a fake main rail that they should not repair. Though when an enemy comes near, they dissapear leading them to think they're still on the real rail
@dzaima I arrived to a similar conclusion. What do you do when there are enemies, though? Auto-bunker would be paranoid - ants passing by can be misidentified as threats.
/me is already thinking of a hilarious Highway attack vector
@Alion yup! And what eventually happens is Vampire moves off the rail, one of its workers is sitting on the rail, and the highway queen gets up on top of them and gets stuck (too far off the rail)
And I could easily make vampire utilize it in her attack anyway. The "hilarious idea" I had was to spawn thieves, which would run the rail in the same direction as Highway's own laden workers, the queen running the same direction as the highway queen. Each loop of a thief would steal food from Highway and return it to Vampire
Highway's queen would never see more than one enemy worker!
Vampire would spawn a lot of workers, but if it's carefully managed (sitting on a given color, can't see any of her own workers, plus-minus some random...) it'd be a net-positive for vampire
I think I can get away with 3 workers - 2 ants as antennas in front of the queen and one behind it. An attack cannot come from the front (only 1 empty space for workers), the back (the worker can easily notify the queen that it's in danger with colors), or the sides (unknown if by queen until it's too late)
@Draco18s well then the gains would be very slow and I don't see an easy uninterruptible way for the queen to stay far away from the queen while the queen moves forwards
I managed to think of a moving bunker. But then it hit me - that bunker requires that some time has already passed, and Vampire can just prevent the Queen from ever getting to that food threshold...
Nah, I managed to handle all of that. But you can't get to the point where nobody else than Vampire can attack you, because Vampire's already attacked you...
Argh, this is messing with my head... If I could somehow make the bunker dodge, I could spawn it immediately, but... How do you synchronize a formation of 10 ants?!