D&D.Sci Long War: Defender of Data-mocracy

post by aphyer · 2024-04-26T22:30:15.780Z · LW · GW · 20 comments


  STORY (skippable)

This is an entry in the 'Dungeons & Data Science' series, a set of puzzles where players are given a dataset to analyze and an objective to pursue using information from that dataset. 

STORY (skippable)

You have the excellent fortune to live under the governance of The People's Glorious Free Democratic Republic of Earth, giving you a Glorious life of Freedom and Democracy.

Sadly, your cherished values of Democracy and Freedom are under attack by...THE ALIEN MENACE!

The typical reaction of an Alien Menace to hearing about Freedom and Democracy.  (Generated using OpenArt SDXL).

Faced with the desperate need to defend Freedom and Democracy from The Alien Menace, The People's Glorious Free Democratic Republic of Earth has been forced to redirect most of its resources into the Glorious Free People's Democratic War Against The Alien Menace.  

You haven't really paid much attention to the war, to be honest.  Yes, you're sure it's Glorious and Free - oh, and Democratic too! - but mostly you've been studying Data Science and employing it in your Assigned Occupation as a Category Four Data Drone.

But you've grown tired of the Class Eight Habitation Module that you've been Democratically Allocated, and of your life as a Category Four Data Drone.  And in order to have a voice in civic affairs (not to mention the chance to live somewhere nicer), you've enlisted with the Democratic People's Glorious Free Army in their Free Glorious People's Democratic War Against The Alien Menace.

Most of the enlistment posters look like this.  (The other half focus on how joining the People's Glorious Free Democratic Army will make you more attractive to [YOUR GENDER OF CHOICE]
Half of the enlistment posters look like this.  The other half focus on how joining the Democratic People's Glorious Free Army will grant you voting rights, a better Habitation Module, and make you more attractive to whichever gender you happen to prefer.  (Generated using OpenArt SDXL).

You enlisted with the Tenth Democratic Free Glorious People's Mobilization, and were assigned to a training battalion under Sergeant Rico.  

He's taught you a great deal about armed combat, unarmed combat, and how many pushups you can be forced to do before your arms give out.

Sgt. Rico in an unusually good mood. (Generated using OpenArt SDXL).

You're sure the People's Glorious Free Democratic Army knows more than you about war in general.  But you feel like the logistical and troop-deployment decisions being made are suboptimal, and you've been on the lookout for ways to employ your knowledge of Data Science to improve them.

So when you got your hands on a dataset of past deployments against the Alien Menace, you brought up with Sgt. Rico that you think you can use that to improve outcomes by selecting the right weapons loadout for each squad to bring.

In retrospect, when he leaned into your face and screamed: 'So you think you can do better, recruit?', that might have been intended as a rhetorical question, and you probably shouldn't have said yes.

Now you've been assigned to join a squad defending against an attack by the Alien Menace.  At least he's agreed to let you choose how many soldiers to bring and how to equip them based on the data you collated (though you do rather suspect he's hoping the Alien Menace will eat you).

But with Data Science on your side, you're sure you can select a team that'll win the engagement, and hopefully he'll be more willing to listen to you after that.  (Especially if you demonstrate that you can do it reliably and efficiently, without sending too large a squad that would draw manpower from other engagements).

For Glory! For The People!  For Freedom!  For Democracy! For The People's Glorious Free Democratic Republic of Earth!  And for being allocated a larger and more pleasant Habitation Module and a higher-quality Nutrition Allotment!


I'll aim to post the ruleset and results on May 6th (giving one week and both weekends for players).  EDIT: Some people wanted extensions, and some answers have still been filtering in, I'll be aiming to post on the 13th to give an extra week.  If you find yourself wanting extra time, comment below and I can push this deadline back.

As usual, working together is allowed, but for the sake of anyone who wants to work alone, please spoiler parts of your answers  that contain information or questions about the dataset.  To spoiler answers on a PC, type a '>' followed by a '!' at the start of a line to open a spoiler block - to spoiler answers on a mobile, type a ':::spoiler' at the start of a line and then a ':::' at the end to spoiler the line.


Comments sorted by top scores.

comment by abstractapplic · 2024-04-27T15:06:05.015Z · LW(p) · GW(p)

Misc. prelim notes:

  • There's a random element. (Existence proof: 16079 and 17759 were the same fight but we only lost 17759.)
  • There's an implicit chrono effect: It looks like this war has been developing not necessarily to our advantage. (Luckily it seems like this is probably 'just' enemies outnumbering our troops more frequently in later rows, and not anyone actually getting better/worse at their job.)
  • The number of troops sent scales with the size of the enemy forces, making inference trickier; however, I haven't seen anything contradicting the hypothesis that loadouts are decided by throwing darts at a board.
  • Specific weapons counter specific enemies: in particular, the Minigun is usually pretty lousy, but drops Scarabs like flies.
  • I expected to find synergies between weapons, and didn't. I did, however, find some antisynergies: Miniguns and Flamethrowers are hella redundant (presumably because they're both anti-Scarab bugspray), and the [MPR] set all clash with each other ("Why do you need Gun? You already have Gun!")
  • Guaranteed victories seem possible. (A single soldier with a minigun can perfectly-reliably survive 5 Scarabs, but not 6.)
Replies from: abstractapplic, abstractapplic
comment by abstractapplic · 2024-04-28T00:45:44.089Z · LW(p) · GW(p)

What we're facing:

  • A horrifying number of Tyrants,
  • A large quantity of Scarabs and Abominations, and
  • A below-par-given-they-showed-up-at-all-but-still-significantly-above-zero count of Crawlers and Venompedes.

Relevant Weapons:

  • Artillery is the optimal counter for Tyrants.
  • Miniguns are very good at handling Scarabs (to the point that bringing more than one would likely be overkill), and pretty useless at most handling most other xenos (to the point that bringing more than one would likely harm our chances).
  • Lances are good counters for anything which isn't a Tyrant or a Scarab. (And also not-terrible vs Tyrants)
  • Torpedos are slightly better than Lances when facing Abominations, and only slightly worse than Artillery when facing Tyrants.
  • (As far as I can tell, the other four weapons aren't worth considering.)

Current strategies per number of soldiers:

8 Soldiers: 3 Artillery, 2 Lances, 1 Minigun, 2 Torpedos.

(My model says this gives me >99% chance of survival, but also says that about just bringing one of every weapon. We can be more daring!)

7 Soldiers: 3 Artillery, 2 Lances, 1 Minigun, 1 Torpedo.

(My model says this gives me ~95% chance of survival.)

6 Soldiers: 2 Artillery, 2 Lances, 1 Minigun, 1 Torpedo.

(My model says this gives me about a 2/3 chance of waking up the next morning.)

5 Soldiers: 2 Artillery, 1 Lance, 1 Minigun, 1 Torpedo.

(My model says this has slightly worse odds than a game of Russian Roulette with five bullets loaded.)

4 Soldiers: 1 Artillery, 1 Lance, 1 Minigun, 1 Torpedo.

(My model says this almost gives me an entire 1% survival chance.)

If I have to pick one strategy:

7 Soldiers: 3 Artillery, 2 Lances, 1 Minigun, 1 Torpedo.

comment by abstractapplic · 2024-04-27T23:44:31.865Z · LW(p) · GW(p)

Description of an investigative cul-de-sac:

I notice that

  • Duels between a Tyrant and an Artilleryman always end well.
  • Duels between a Tyrant and a Minigunner, Phaser or Flamethrower always end badly.
  • Tyrant vs Artilleryman 2v2s . . . don't happen, ever. (Turns out the quartermasters do display some nonrandom behaviors, and one of these is a bias towards weapon variety.)
  • 2v2s involving two Tyrants, an Artilleryman, and someone who'd lose a 1v1 against a Tyrant . . . end well pretty much exactly half the time, regardless of which [MPF] is used.

I reason that

This is what we'd see in a turn-based fight where humans aggressively heroically always take the first move, and the xenos move randomly. The Artilleryman caps a Tyrant every time; the remaining Tyrant then picks a random human to squish; they pick the dud half the time; we get the coinflip we see.

But then

I find out that there are 2v1 fights between two Tyrants and a lone Artilleryman, and these have the exact same 50% win chance; the dud isn't even useful as a decoy; my hypothesis is falsified.

From all this I conclude

Absolutely nothing.

comment by Measure · 2024-04-30T15:56:26.673Z · LW(p) · GW(p)

1 soldiers: F (0.45%)

2 soldiers: AF (10%)

3 soldiers: AAF (47%)

4 soldiers: AAAF (81%)

5 soldiers: AAALL (95.5%)

6 soldiers: AAAALL (98.9%)

According to my model, for larger numbers of soldiers, you don't need a specific anti-Scarab weapon. It's slightly more important to make sure you have a good matchup against the Tyrants.

Single answer: "No guts, no glory. (plus we're losing the war, so my odds aren't very good to begin with)" - 6 soldiers: AAAALL

Replies from: Measure
comment by Measure · 2024-04-30T17:55:52.528Z · LW(p) · GW(p)

I think Artillery treat all aliens equally. Probably some sort of one-shot K.O. Minigun and Flamethrower are anti-Scarab, but Flamethrower is strictly better. Grenades and Lance are general-purpose, but Lance is strictly better. Phasers are a slightly worse general-purpose and bad against Tyrants, but good against Scarabs. Torpedoes are similar to Artillery, but slightly better against Abominations and slightly worse against Tyrants. Rifles are marginally optimal against pure Crawlers, but in a mixed group there are better general-purpose options.

	A:	F:	G:	L:	M:	P:	R:	T:
A:	2	1	1.5	2	0	1	1.5	2.5
C:	2	2.5	3	4	2	3	4	2
S:	2	7.5	3	3.5	7	5.5	4.5	2
T:	2	0	1	1.5	0	0	0.5	1.5
V:	2	1.5	3	3.5	1.5	2	2.5	2
Replies from: abstractapplic
comment by abstractapplic · 2024-04-30T19:02:49.380Z · LW(p) · GW(p)

If I'm following your notation right, it looks like you mixed up Flamethrowers and Miniguns.

Replies from: Measure
comment by Measure · 2024-04-30T19:07:08.228Z · LW(p) · GW(p)

yeah, I adjusted the numbers in the chart, and haven't updated the rest yet.

comment by qwertyasdef · 2024-04-28T07:08:19.168Z · LW(p) · GW(p)

Initial observations characterizing the data

The PGFDA seems to treat all weapon types completely interchangeably. All weapon types appear equally often and with the same distribution, and there are no correlations between different weapon types or between weapon types and alien species in the past missions. The only tactical decision they make is to send more soldiers when there are more aliens.

The alien species also seem to be acting independently of each other. They each have different distributions in the number of individuals per encounter but each species shows up in about 100,000 encounters and there are no correlations between the presence of any alien species with any other.

Victory is somewhat correlated with number of soldiers which makes sense, but isn't correlated with specific weapon or alien types. I would guess that each weapon is strong and weak against certain aliens, or maybe some weapons combinations synergize and others interfere with each other such that they all come out to the same average effectiveness when chosen at random like the PGFDA and AM are doing.

Replies from: qwertyasdef
comment by qwertyasdef · 2024-05-09T02:46:44.862Z · LW(p) · GW(p)

I misremembered the May 6 date as May 9 but luckily other people have been asking for more time so it seems I might not be late.

The average number of soldiers the Army sends looks linear in the number of aliens. A linear regression gives the coefficients: 0.40 soldiers by default + 0.66 per Abomination + 0.32 per Crawler + 0.16 per Scarab + 0.81 per Tyrant + 0.49 per Venompede. From here, the log-odds of victory looks like a linear function of the difference between the actual number of soldiers and the expected number of soldiers.

Based on no evidence at all, I will assume this generalizes to the individual weapon types and that each additional soldier of each weapon type increases the odds of victory by some fixed amount depending on the composition of the aliens, but not dependent on the other soldiers already present.

Here's a guess that can definitely be improved upon but I don't know if I will

7 Thermo-Torpedos

It's definitely wrong because

Weapon diversity clearly helps but my model makes that impossible. I'm pretty sure my assumption that the effectiveness of each marginal soldier is the same and only depends on the aliens is wrong, even though it does look true when averaged over all weapon and alien types.

comment by Unnamed · 2024-05-06T05:13:19.216Z · LW(p) · GW(p)

Just got to this today. I've come up with a candidate solution just to try to survive, but haven't had a chance yet to check & confirm that it'll work, or to try to get clever and reduce the number of soldiers I'm using.

10 Soldiers armed with: 3 AA, 3 GG, 1 LL, 2 MM, 1 RR

I will probably work on this some more tomorrow.

Replies from: aphyer
comment by aphyer · 2024-05-06T10:42:49.702Z · LW(p) · GW(p)

Understood, I'll refrain from posting the solution tomorrow until I've heard from you - if you want more time, let me know and I can push that further back.

Replies from: Unnamed, NickSharp
comment by Unnamed · 2024-05-06T17:27:57.778Z · LW(p) · GW(p)

You can go ahead and post.

I did a check and am now more confident in my answer, and I'm not going to try to come up with an entry that uses fewer soldiers.

comment by NickSharp · 2024-05-07T19:42:00.565Z · LW(p) · GW(p)

I would like one more day if no one objects. No big deal though, I may or may not have anything by tomorrow anyway. 
Thanks for posting! 
Love these challenges!!

Replies from: aphyer
comment by aphyer · 2024-05-07T19:48:35.876Z · LW(p) · GW(p)

I'm always happy to have more players: if you want more than one day that's not a big deal, I'm happy to delay until next week if you'd like.

comment by Yonge · 2024-04-29T07:56:46.418Z · LW(p) · GW(p)

 The more soldiers that come, the higher the chance of victory. We however will be outnumbered by at least 6, and previous squads that were outnumbered this badly only won 58 percent of the time.
There is no massive difference where the presence of one weapon and alien leads to victory, or where an alien is present but a weapon absent leads to defeat.

Looking at the cases where 1 soldier fought 1 alien:
- Artillery reliably win against venomopede, tyrants, scarab (only 8 records), crawlers, abominations
- Flamethrowers reliably beat crawlers, scarabs (only 5 records), normally win against venomopede, but normally lose to abominations, and consistently lose to tyrants.
- Grenades reliably win against abominations, crawlers, scarabs (only 6 records), venomopede normally win against tyrants 
- Lance reliably win against venomopede, scarab (only 6 records), crawlers, abominations normally win against tyrants
- Minigun reliably wins against crawlers, scarab (only 3 records), venomopede reliably loses against abominations, tyrants
- Phaser reliably wins against venomopede, scarab, crawler, normally wins against abomination reliably loses against tyrants
- Torpedoes reliably wins against abominations, crawlers, scarabs (Only 5 records), venomopede normally wins against tyrants
 Tyrants look like the strongest enemy followed by abominations.
When 1 soldier faced 2 abominations they always lost unless they either had torpedoes, lance or artillery. Torpedoes seem best but aren't perfect.
When 1 soldier faced 2 crawlers they always won if they were equipped with grenades, lance or phaser.
When 1 soldier faced 2 scarab they always won unless they were equipped with artillery or torpedoes.
When 1 soldier faced 2 tyrants they always lost unless they were equipped with artillery which won about half the time.
When 1 soldier faced 2 venomopedes they always won if they were equipped with grenades or lances

When 2 soldiers go into battle they are never equipped with the same weapons.
When 2 soldiers faced 3 tyrants the only combinations with victories were (torpedoes + mini gun and torpedoes + lance). 1 Artillery was insufficient. Suggest 1 artillery is insufficient to deal with 3 tyrants.

Looking at battles where only scarabs are present suggests the following limits on the number that can be defeated by a single type of weapon reliably:
- Artillery and tropedoes: 1
- Grenades and lances: 2
- Rifles and flamethrowers: 3
- Phasers: 4
- Minigun: 5

It looks like that if you have enough weapons to reliably win against each type individually then you will win reliavbly against the group.

This suggests that the following would give us a 100 percent - epsillon chance of victory:
- 3 artillery (Deals with Tyrants)
- 2 mini guns (Deals with Scarabs) 

- 3 torpedoes (Deals with Abominations)
- 1 grenade (Deals with crawlers/venompede)
- 1 lance (Deals with crawlers/venompede)

I suspect it can be done with fewer soldiers, however this is my provisional lineup if I don't get a chance to look at this further.

Replies from: Yonge
comment by Yonge · 2024-05-05T23:22:21.451Z · LW(p) · GW(p)

There is some evidence that 2 artillery is sufficient to deal with 3 tyrants, but the amount of data is a bit small. I couldn't see any other change I could make which wouldn't lead to at least some measurable risk of loseing.  Risking being eaten to impress my superiors feels like a poor trade off, especially as they should hopefully be at least somewhat impressed with winning a battle at 10:16 odds, so I will stick with my initial selection. (Though I'm pretty sure that someone who was willing to take some risk of being eaten for extra prestige would be well advised to take one fewer artillery.)

comment by abstractapplic · 2024-04-28T00:56:30.929Z · LW(p) · GW(p)

The leaderboard will track how well you've done relative to random/best play at the # of soldiers you chose to bring.

Could you elaborate on this? I think I'd do better relative to best play with

high numbers of soldiers,

and do better relative to random play with

 low numbers of soldiers,

so it's not clear which way I should lean; also, I don't know how you plan to quantify "relative to".

Replies from: aphyer
comment by aphyer · 2024-04-28T01:27:21.739Z · LW(p) · GW(p)

I'm likely not to actually quantify 'relative to' - there might be an ordered list of players if it seems reasonable to me (for example, if one submission uses 10 soldiers to get a 50% winrate and one uses 2 soldiers to get a 49% winrate, I would feel comfortable ranking the second ahead of the first - or if all players decide to submit the same number of soldiers, the rankings will be directly comparable), but more likely I'll just have a chart as in your Boojumologist scenario:

with one line added for 'optimal play'  (above or equal to all players) and one for 'random play' (hopefully below all players).

Overall, I don't think there's much optimization of the leaderboard/plot available to you - if you find yourself faced with a tough choice between an X% winrate with 9 soldiers or a Y% winrate with 8 soldiers, I don't anticipate the leaderboard taking a position on which of those is 'better'.

Replies from: abstractapplic
comment by abstractapplic · 2024-04-28T01:33:01.130Z · LW(p) · GW(p)

That makes sense, ty.

comment by abstractapplic · 2024-04-27T10:14:37.512Z · LW(p) · GW(p)

Thanks for running this when my one was going to be late, and thanks for checking with me beforehand.

(Also, thanks for the scenario, like, in general: it looks like a fun one!)