Some issues in Planet Wars strategy. These are points that I thought represented a good way of thinking, or that I thought others had misunderstood. Or where I just wanted to make it clear what my words mean.
The basic tactical goals are taking neutral planets, taking enemy planets, and defending your own planets. A lot of other goals are possible, but these are the ones I see as both basic and tactical: Others are complex (“take this cluster that can then defend itself”) or strategic (“own the center!”) or both.
The basic tactical goals follow from the rules of the game. They are directly coded into oddshrimp’s move generator.
Ship positioning is the distribution of your ready ships, those that are not being used for other purposes, among your planets. Good ship positioning is hard. Even bocsimacko and late oddshrimp versions make positioning mistakes for fundamental reasons.
The goal of ship positioning now is to support other goals in the future. In general you can’t know your future goals, because they depend on the enemy’s choices, so you have to prepare for a range of possibilities. Fortunately, the range is predictable.
The basic goals of positioning are to support the three basic tactical goals. To support taking enemy planets, you want to position ships to the front line so they are as close to the enemy as possible. To support defending your own planets, you want ships flexibly placed so they can respond to anything. The front line is often a flexible position, since it allows response to everything behind it, but sometimes a rear position has shorter lines of communication. And sometimes a planet is “out on a limb” (see the section on reaction time below) and the only way to defend it is to position ships there before they’re needed. You should also take into account that attacking the enemy can substitute for defending yourself: If the enemy attacks then they necessarily weaken their own planets, so maybe you should counterattack. To support taking neutrals you want to position ships near rich neutrals, which commonly means holding them back from the front lines briefly until the neutral can be taken. These three basic goals often conflict with each other and have to be traded off, and yet at the same time they underspecify positioning. For example, if you want ships on the front line, then where on the front line?
Bocsimacko tries to position its ships near enemy ships. That’s a defensive and stabilizing choice which makes sense for the stronger player, but it’s not best play. Best play is to position ships near high-growth planets, whether they are yours, the enemy’s, or (with a different cost and benefit) neutrals.
A simplified example. Suppose the situation is dead even, and each side owns a rich cluster and a poor cluster that face off on the front lines, rich against rich and poor against poor, plus a large rear base that supplies most of the ships. If the opponent sends ships from the rear base to the poor cluster (maybe it’s closer) then bocsimacko will tend to follow suit, keeping the game even. Best play is to send the rear ships to the rich cluster ignoring what the enemy does. If the enemy keeps forwarding ships to its poor cluster then you win: You lose your poor cluster and take the enemy rich cluster.
Every time I find an improvement to the positioner, oddshrimp gets stronger. There’s no end in sight.
Relative reaction time is the difference between the enemy’s reaction time to a planet (their nearest other planet’s distance from it) and your reaction time. Relative reaction time is 0 if both sides are at the same distance. The author of #28 Neverstu called this idea “latency”, a good name for it.
It's a little more complicated than “how far away are the planets each side owns now”. Suppose for example that the enemy has a fleet on the way to take neutral A, which is near planet B. Even though the enemy may not have any planets near B now, if it can get ships there sooner than you (via A) then it has a reaction time advantage.
I say that a planet of yours is “out on a limb” if the relative reaction time is either 0 or favors the enemy. It’s a “limb planet”. If the enemy has enough ships then they can take the limb planet, at least temporarily, and you won’t be able to respond in time. Planets with 0 relative reaction time often cause bots to get into behavior loops where each takes the planet back from the other.
Reaction time is never the whole story, because it doesn’t include ship numbers. Sure, the enemy is closer than you, but if the enemy has few ships free then it’s no emergency yet. Evaluations of potential or “full attack futures” implicitly take reaction time into account complete with ship numbers.
Oddshrimp explicitly calculates reaction time in the move generator when it’s useful. I traced a major weakness of oddshrimp4.1 to an internal behavior loop that could happen when trying to take planets with 0 relative reaction time. The search was unable to resolve the behavior loop and so the program sometimes made awful decisions. I had to add smarts to the move generator to solve the problem; it’s a big improvement in oddshrimp4.2.
By “finishing attack” I mean an all-out attack intended to finish the game. You make a finishing attack when you think you’re going to win and you decide to do it now. A finishing attack can be risky, if the opponent is able to create complications.
Trading down means trading ships in battle without necessarily taking any planet or achieving any other goal. It’s often a good idea when you’re ahead.
Intuitively, trading down may seem like a way to win. After all, if you’re ahead 200 ships to 100 then you have the game in hand, and if you traded down until it was 100 to 0 then the fight would be over. But it doesn’t work that way. You don’t win by trading existing ships, you win by closing the enemy’s supply of new ships by taking all their planets. Taking the planets while stopping the enemy’s attempts to take new ones will do all the necessary trading down as a side effect, so it’s all you need.
At heart, trading down is not a winning maneuver but a risk reduction maneuver. Every goal, basic or complex, needs a minimum number of ships to accomplish. With fewer ships, fewer things can be done. If you’re ahead, you commonly want to trade down because it reduces the enemy’s options and therefore reduces your risk that the enemy will find a surprise. If you make a finishing attack with thousands of ships on the map, the enemy will throw up complications and you may go wrong. If you trade down to hundreds of ships first, then any complications will be easy to manage.
This explains the design choices of some bots. Bocsimacko has a term in its evaluation function that encourages trading down whether ahead or behind because, as the stronger player and yet tactically sloppy, it always benefits from reduced risk. In fact, the skillful attacks it makes in trading down can easily confuse weaker bots, so it’s a way to win from behind. I removed the tradedown term from oddshrimp’s evaluator because oddshrimp is tactically superior and faces almost no risk from complications (results without were unchanged).
You’re about to lose a planet. What do you do with the ships there? You could leave them in place to trade against the enemy ships; many bots consider nothing else. Or you could send them out for a last strike at the enemy, a desperado attack. Your ships will not live long behind enemy lines, but while they do they have a chance to wreak havoc.
I added desperado attacks to oddshrimp for version 4.2, an important improvement. Whether you’re ahead or behind overall, a desperado attack is often the best tactical choice when you’re losing a planet. If you can briefly take an enemy planet, you can earn a few extra ships and divert enemy forces farther from the front lines where the real fight is, and that is usually better than trading. If you’re behind in the game (or if you’re tactically skilled like oddshrimp) then an extra advantage is that it creates complications and gives the opponent a chance to go wrong.
A third option, besides trading or desperado attack, is to retreat the ships to a friendly planet. If no desperado attack can take an enemy planet, or if the retreated ships have another valuable use, then retreat may be best. I’ve only seen a few bots do it.
A ship on a planet could go anywhere next. It participates in decisions. A ship in flight is going to its destination willy-nilly. A ship in flight over a long distance is out of play for a long time. To launch ships bears an opportunity cost, and the farther they fly, the higher the cost.
So, other things being equal, a short move is better than a long move. A “cross move” is a long move from a distant planet when ships were also available from a nearby planet. It may be bad, but not always. Maybe the distant ships weren’t needed where they were, or maybe they plan to join the nearby ships in a joint attack.
A “cross attack” is a sequence of two attacks (or more) that are cross moves in opposite directions. It commonly happens when a bot decides to attack here, and then a few moves later changes its mind, leaves the first fleet to its fate and attacks there instead. I wince when I see oddshrimp do it.
Cross positioning is also possible, repositioning ships in opposite directions. With most bots it’s very rare, but the bureaucratic #8 GreenTea does it sometimes. One form is what I call hairpin positioning, where ships take a long path from A to B to C when they could have taken a short path from A to C. Oddshrimp does that occasionally.
The story is, long moves are a little suspicious. I’ve seen bocsimacko lose by making bad long moves. Cross moves are more suspicious. Cross attacks are almost always bad. Oddshrimp4.2 has a new term in its evaluator to discourage long moves (and encourage forcing the opponent into them), but on a bad day it may still make a nonsensical cross attack.
By “tacking” I mean attacking at one point to divert the enemy’s ships, and following up by attacking a distant point that is now underprotected. I stole the term from chess strategist Aron Nimzovich, who used it in a related sense.
Tacking is a way to break into an enemy position that may be impregnable to any single attack, though it only works against extended positions and not against compact ones. Many bots overcommit to defense of the first attack in the tacking maneuver, amplifying the misfortune that’s about the befall them. They imagine, I suppose, that their opponent may keep attacking the same point over and over.
Oddshrimp plays tacking maneuvers naturally starting with 2.x versions which have no lookahead and definitely do not understand what they are doing. I was delighted to see a sound strategic concept emerge from straightforward tactical considerations. Oddshrimp4.1 and later search deeply enough to understand tacking and play it with knowledge of the consequences, though I’m not sure how often they truly do.
Other bots seem to tack rarely or never, even the strongest ones. Bocsimacko’s “full attack futures” apparently can’t generate the concept.
I say a bot is “aggressive” when it attacks the enemy and “greedy” when it takes neutrals. (When it does neither, it’s passive or defensive.) It can be about style (“this bot keeps getting into trouble because it’s too greedy”) or about game situations (“now the base is built and the strategy switches to aggression”).
Perfect play is out of reach. I think of a bot’s style as “balanced” between aggression and greed if it makes about as many mistakes of aggression as mistakes of greed. Work toward balancing oddshrimp’s style in versions 3.3 and 3.4 brought big improvements.
This is a style distinction that holds across games. A daring player wants to make gains; a solid player wants to avoid setbacks. It’s about the risk-reward tradeoff. A daring player seeks risk for the gains it may bring; a solid player avoids risk for the setbacks it may bring.
Bocsimacko is solid because it “knows” it’s the better player and it wants to avoid risk. It avoids weakness to the point that that behavior itself becomes a weakness (which I intend to exploit). Oddshrimp is daring. It’s constantly pushing a little harder than is safe, taking an extra neutral when it barely has the ships to stay alive, or attacking wildly instead of defending itself. Alpha-beta programs tend to be like that: They usually don’t encode any notion of risk in their evaluators, so they’re always striving for the limits, trying to walk along the deadly edge between what’s possible and what’s not. It works on average, winning some points by provoking mistakes from stronger bots and losing some by making mistakes against weaker bots.
last update 15 July 2014
original version 31 March 2014