though I can see where there might be problems where attacker chooses ship A, defender chooses ship B, attacker switches to ship C because it's better against ship B, and defender switches to ship D because it's better against ship C, and then the attacker switches back to ship A ... |
Rock-Paper-Scissors has no best pure strategy. The highest score that can be had is achieved by playing a mixed strategy of 1/3rd chance of playing any of the three moves each turn by both players. If playing multiple rounds, it is also prudent to take advantage of any perceptible pattern in enemy choice history, while making your own as random as possible. Another way of looking at this is to say we have friendly ship list { A, B, C, ... } and enemy ship list {a, b, c, ... }. They can also be thought of as weapons or weapon groups. We can draw up a cross-reference table like so:
-- A B C ...
a
b [outcome score]
c
...
Then extract only the set of outcomes with the highest value to you, and choose randomly between them. Or assign probability of choosing a given attack according to it's outcome score.
The main task is then choosing a scoring system. If we define "winning" as the process of reducing enemy threat of damaging our weapons to zero before the enemy does that to us, then we can develop an appropriate score system. And the scores could be weighted to take into account any attack/defense modifiers like lead ship/escourts protecting their charge, heroic units, ship size, racial bonus, etc.
Then each firing produces a change in the scoring table, which results in a new table for the next round. The objective is then to search for a sequence of table updates (chess positions) that result in a winning outcome. As an example of this kind of look-ahead paying off, it might be possible to take out a single enemy gun this round by shooting at that small ship, but if firepower was directed instead at a sleightly larger ship then it would take out three enemy guns next round.