Scott Martin
SOC-13
Hi
I'm taking a break from a nasty code problem, so I'll offer a design for your auto-system. Warning that I have not played TCS / HG in a LONG time, so I can't remember some of the mechanic specifics. If these will significantly change how the algorithm must work, they have been noted.
An "automated" system for HG combat could be as simple as something like an auto-roller. This would save you lots of time just by eliminating the rolling of dice and looking up of tables. and automatically applying damage to systems.
If you want a fully automated tester, you need the auto-roller anyway, but you also need five other modules for decisions, and all of these can be done with a person choosing an option manually. I will argue later which of these can be trivially done with automation, and which would be best done with a human at first.
1) Main or Reserve?
If a ship can inflict damage on its opponents, put it in "main" if it can't put it in reserve.
You may want to program something that puts ships into reserve if they double their base vulnerability to enemy fire (base "to hit" goes from "9" to "7" for the main weapons of the opponent: go repair the computer or drives) or they lose 50% of their chance to hit the enemy (base "to hit" changes from a "7" to a "9", go repair weapon batteries or computer)
2) Target Selection.
"Blue" ship 1 should fire at "Red" ship 1,
"Blue" ship 2 should fire at "Red" ship 1,
"Blue" ship 3 should fire at "Red" ship 2,
"Blue" ship 4 should fire at "Red" ship 2
(Wash, rinse repeat. NB that this may have each ship firing at multiple targets)
3) Choice of weapon roles
No-Brainers:
PAWs, Missiles Meson Guns: shoot bad guys
Repulsors: Missile Defence only
Energy weapons: Missile Defence at long range
Role choices to be made:
Lasers: Offence or Missile Defence
Energy weapons: same choices as lasers *at short range only*
Sand: Missile Defence OR Beam Defence. Since you get to choose after fire is resolved, this is trivial: stop the missiles first, then the beams (assumes that nukes are in use)
All of the role choices revert to "trivial" if your opponent has no missiles
4) Choice of what to intercept with active defences. Against Cap Ships, algorithmically I'd start by stopping the "easiest" attack with the "weakest" defence and working my way up, since all "hits" are the same. I'd probably also stop all nuke missile hits before starting on beam hits.
5) What to repair if your ship is in the reserve. Reviving the frozen watch (if needed) is a no-brainer, the rest needs to be based on why you pulled the ship into the reserve in the first place...
_________________________________________
Simple Decisions: (AKA cheatng to make the tester easier)
1) Leave all ships in the line until they blow up. Yes, it's unrealistic, but damage control should favor both sides equally: running a few tens or hundreds of the same scenario should give roughly the same results
2) Target Selection: Use a player to set up taregets the first time you do this. How long will it take for a person to point batteries with a decent interface? even running massive multiples of battles, it's probably easier for a person to do this than to code, and once they have the "hang" of optimal target selection, they can probably give you a good idea what the allocation algorithm looks like. This will also interact strongly with "weapon roles" below, so one target selection option should *always* be "All blue ships shoot at red ship #1, all red ships shoot at blue ship #1"
3) Weapon Roles: Run 4 sets of scenarios, with the sides alternating "Max Offense" and "Max Defence" (offense vs offensie, offence vs defence, defence vs offense, defence vs defence) this should give you an idea how the ships stack up against each other.
4) I believe that I already have the suggested algorithm. I can't remember if you allocate all active defences and then roll them, or if this is sequential (I missed with sand battery #1, so now I'll try sand battery #2) If it is sequential, then this is easy to automate, if not then it gets a bit trickier.
Remember to never allocate active defence on targets that are guarenteed intercepted with passive defences (Nuke dampers)
5) What to repair in the reserve: Dealt with in point 1) fight to destruction. The only exception that springs to mind is if you aren't allowed to revive the frozen watch unless you are in the reserve
Scott Martin
HG abuse testers are a lot easier than figuring out UI's for graph theory applications...
I'm taking a break from a nasty code problem, so I'll offer a design for your auto-system. Warning that I have not played TCS / HG in a LONG time, so I can't remember some of the mechanic specifics. If these will significantly change how the algorithm must work, they have been noted.
An "automated" system for HG combat could be as simple as something like an auto-roller. This would save you lots of time just by eliminating the rolling of dice and looking up of tables. and automatically applying damage to systems.
If you want a fully automated tester, you need the auto-roller anyway, but you also need five other modules for decisions, and all of these can be done with a person choosing an option manually. I will argue later which of these can be trivially done with automation, and which would be best done with a human at first.
1) Main or Reserve?
If a ship can inflict damage on its opponents, put it in "main" if it can't put it in reserve.
You may want to program something that puts ships into reserve if they double their base vulnerability to enemy fire (base "to hit" goes from "9" to "7" for the main weapons of the opponent: go repair the computer or drives) or they lose 50% of their chance to hit the enemy (base "to hit" changes from a "7" to a "9", go repair weapon batteries or computer)
2) Target Selection.
"Blue" ship 1 should fire at "Red" ship 1,
"Blue" ship 2 should fire at "Red" ship 1,
"Blue" ship 3 should fire at "Red" ship 2,
"Blue" ship 4 should fire at "Red" ship 2
(Wash, rinse repeat. NB that this may have each ship firing at multiple targets)
3) Choice of weapon roles
No-Brainers:
PAWs, Missiles Meson Guns: shoot bad guys
Repulsors: Missile Defence only
Energy weapons: Missile Defence at long range
Role choices to be made:
Lasers: Offence or Missile Defence
Energy weapons: same choices as lasers *at short range only*
Sand: Missile Defence OR Beam Defence. Since you get to choose after fire is resolved, this is trivial: stop the missiles first, then the beams (assumes that nukes are in use)
All of the role choices revert to "trivial" if your opponent has no missiles
4) Choice of what to intercept with active defences. Against Cap Ships, algorithmically I'd start by stopping the "easiest" attack with the "weakest" defence and working my way up, since all "hits" are the same. I'd probably also stop all nuke missile hits before starting on beam hits.
5) What to repair if your ship is in the reserve. Reviving the frozen watch (if needed) is a no-brainer, the rest needs to be based on why you pulled the ship into the reserve in the first place...
_________________________________________
Simple Decisions: (AKA cheatng to make the tester easier)
1) Leave all ships in the line until they blow up. Yes, it's unrealistic, but damage control should favor both sides equally: running a few tens or hundreds of the same scenario should give roughly the same results
2) Target Selection: Use a player to set up taregets the first time you do this. How long will it take for a person to point batteries with a decent interface? even running massive multiples of battles, it's probably easier for a person to do this than to code, and once they have the "hang" of optimal target selection, they can probably give you a good idea what the allocation algorithm looks like. This will also interact strongly with "weapon roles" below, so one target selection option should *always* be "All blue ships shoot at red ship #1, all red ships shoot at blue ship #1"
3) Weapon Roles: Run 4 sets of scenarios, with the sides alternating "Max Offense" and "Max Defence" (offense vs offensie, offence vs defence, defence vs offense, defence vs defence) this should give you an idea how the ships stack up against each other.
4) I believe that I already have the suggested algorithm. I can't remember if you allocate all active defences and then roll them, or if this is sequential (I missed with sand battery #1, so now I'll try sand battery #2) If it is sequential, then this is easy to automate, if not then it gets a bit trickier.
Remember to never allocate active defence on targets that are guarenteed intercepted with passive defences (Nuke dampers)
5) What to repair in the reserve: Dealt with in point 1) fight to destruction. The only exception that springs to mind is if you aren't allowed to revive the frozen watch unless you are in the reserve
Scott Martin
HG abuse testers are a lot easier than figuring out UI's for graph theory applications...