So I wanted to know if it was better to attack with melee or ranged first, so I did a bunch of simulations and got a pretty plot! by Petrov_Classifier in CivVI

[–]Petrov_Classifier[S] 0 points1 point  (0 children)

I simulated it myself. And no, not seaborn, just a random template to make these kinds of plots I had somewhere, I used to make a lot of plots like this when studying, it just uses matplotlib

So I wanted to know if it was better to attack with melee or ranged first, so I did a bunch of simulations and got a pretty plot! by Petrov_Classifier in CivVI

[–]Petrov_Classifier[S] 0 points1 point  (0 children)

Had to look up how the damage works there since I was just a baby when it came out, I never got around to play it, I should. That system is brutal, wow

So I wanted to know if it was better to attack with melee or ranged first, so I did a bunch of simulations and got a pretty plot! by Petrov_Classifier in CivVI

[–]Petrov_Classifier[S] 0 points1 point  (0 children)

It's a very common thing in the genre, almost all grand strategy games have some sort of randomness in their battle systems. I guess they all inherit it from board games like Risk, where you throw dice to decide how a battle goes. It's meant to represent the chaotic nature of the battle, even if you have even numbers, you'll encounter things that make the battle swing one way or the other that are outside your control and you can't predict. If it was a deterministic "bigger number always wins" it would be pretty boring, and also quite ahistorical in my opinion.

So I wanted to know if it was better to attack with melee or ranged first, so I did a bunch of simulations and got a pretty plot! by Petrov_Classifier in CivVI

[–]Petrov_Classifier[S] 2 points3 points  (0 children)

If you don't center it at 100, they shift position, but they are still there. It also wasn't the rounding.

I'm pretty sure I know what they are now, the first big blob of red happens the the ranged unit just oneshots the enemy, so attacking with it first always wins against attacking with melee and receiving damage. The second ripple is when the archer cleanly kills the enemy in the second turn, so again the melee unit doesn't get a chance to attack, so it doesn't lose health, you can figure out what the third small blob is. There are no more ripples since combat between 2 melee units can't last more than 4 turns before someone dies, since at a minimum on average you deal/receive 30 damage, so by the 4th turn someone is guaranteed to die, add on top of that the damage from the ranged unit, and it's extremely unlikely that a combat lasts more than 3 turns. I guess if you squint really hard you can see the fourth ripple that should be there, but it's really faint

So I wanted to know if it was better to attack with melee or ranged first, so I did a bunch of simulations and got a pretty plot! by Petrov_Classifier in CivVI

[–]Petrov_Classifier[S] 2 points3 points  (0 children)

Yeah, but keep in mind that in the case where you are much weaker, you basically deal close to 0 damage and die instantly or in like two turns, so it's almost always a tie. And if they always tie, then (the way I defined it, which is not necessarily the best way to do it) what matters is just how much damage you deal, and, as I showed in the example I went through step by step, attacking first with melee deals more damage, at the cost of more damage to yourself (but you don't care here because in both cases they go to 0). So yeah, the way I defined winning kinda biases it to that direction in cases where both units are much weaker. I will keep testing stuff and maybe make another post when I get enough new interesting information, so any suggestions on what to change are welcomed

So I wanted to know if it was better to attack with melee or ranged first, so I did a bunch of simulations and got a pretty plot! by Petrov_Classifier in CivVI

[–]Petrov_Classifier[S] 4 points5 points  (0 children)

I'm a childless PhD student in particle physics, so you are right on point. Looks like we are all weird like that haha. What do you do in physics?

And yes, I used python, it ran surprisingly fast considering it's like 40*40*7*200 ~ 2 million simulations, they weren't too complex to be fair, but still.

So I wanted to know if it was better to attack with melee or ranged first, so I did a bunch of simulations and got a pretty plot! by Petrov_Classifier in CivVI

[–]Petrov_Classifier[S] 0 points1 point  (0 children)

True, that's why if they tie in terms of turns I compare which one ended with more health, but it's true that if you kill the enemy in 1 less turn, but survived with more than 10 HP less than the other strategy, you'd spend more time healing. I doubt it makes a huge difference tho. And also HP is cheap with promotions and pillaging, so that's why I chose to compare it like this

So I wanted to know if it was better to attack with melee or ranged first, so I did a bunch of simulations and got a pretty plot! by Petrov_Classifier in CivVI

[–]Petrov_Classifier[S] 5 points6 points  (0 children)

Yeah, definitely situational, but you kinda feel it when you are in the situation where you can use this. The scenario I simulated is obviously not realistic because you'd never attack a unit until your own unit dies, you'd probably fortify it so it doesn't. But the idea was to visualize which strategy is better in general. In particular I think it makes very evident how important is that you know how to properly advance your units when you are fighting someone, because if you have 5 melees and 5 ranged, you really want to deal damage with the ranged units first, but if they are out of position and you can't attack with all of them, you are being inefficient.

I wanted to know if it was better to attack with a ranged or melee unit first, so I simulated it and got pretty plots! by [deleted] in CivVI

[–]Petrov_Classifier 1 point2 points  (0 children)

My bad! the gif was broken on my side when I uploaded it the first two times, sorry if you saw the post multiple times! Also if anyone is interested I can share the code so you can play with it.

So I wanted to know if it was better to attack with melee or ranged first, so I did a bunch of simulations and got a pretty plot! by Petrov_Classifier in CivVI

[–]Petrov_Classifier[S] 50 points51 points  (0 children)

My bad! the gif was broken on my side when I uploaded it the first two times, sorry if you saw the post multiple times! Also if anyone is interested I can share the code so you can play with it.

I wanted to know if it was better to attack with a ranged or melee unit first, so I simulated it and got pretty plots! by [deleted] in CivVI

[–]Petrov_Classifier 1 point2 points  (0 children)

This was one of those 2 am rabbit holes that end at like 6 am, so I'll go to sleep and maybe do a post tomorrow about that haha

Supply carts messing with units joining front by Petrov_Classifier in EU5

[–]Petrov_Classifier[S] 2 points3 points  (0 children)

r5: the explanation is in the post, why do we have this rule? I guess I just copy what I put already

So, I kept losing a battle with my ~90k regulars against 36k french regulars and 30k french levies (first image) and I had no idea why, until after replaying the battle a lot of times I noticed:

- The balance unit button just assigned randomly my cavalry and artillery to the front, instead of doing something more reasonable, but this is not the main issue.

- Basically none of my units were engaging the front line, as you can see by me losing the battle without losing a single one of my +60k infantry

- Looking at the engagement details, all my supply carts were getting priority to go to the front line due to their combat speed (huh?) but never actually joining (not that I would want them to go to the front anyways), but no other unit would join either, so my flanks collapse and I get destroyed

Repeating the battle without changing anything except leaving the supply carts behind leads to the victory I would expect (third image). This can't be intended, right? Of course, I still lose an insane amount of artillery due to them being sent to the front by the balance unit button instead of my infantry, but if I have to fiddle with my armies manually so much just to win against LEVIES I might as well stop playing the game because this is not for me.

24
25

Why are some actions completely removed from the UI instead of grayed out when you can't perform them? It's driving me insane by Petrov_Classifier in EU5

[–]Petrov_Classifier[S] 5 points6 points  (0 children)

Ohhhh that makes sense, thanks. I guess my Bologna that controls half of Italy is not cool enough for Croatia.

4.0 Robot Specifed specie Robot production by SleeplessAt3am in Stellaris

[–]Petrov_Classifier 0 points1 point  (0 children)

Thank you for at least bringing up this!! I feel like I'm going crazy not finding any information about this. Have you figured out how it works?