Jump to content

X-com 2 math problem


RainDreamer

Recommended Posts

*Require some familiarity with X-Com games for context*

 

Right now I am about to send my soldier to hack a target with 35% success chance. In X-Com, every action you take generate a new number for the result of the next action (or so I think) and therefore if you repeating the same sequences of actions, you get the same result, thus if you want differences results, you need to take different action. So in my case, if I randomly take actions with any of my soldiers, before sending in my hacker attempting that 35% hack, I may luckily find a sequence that gives me a successful result. 35% of my possible action sequences will result in success, while the rest will be failure.

 

It is now the beginning of my turn, and I have 6 soldiers, all with 2 actions to be used, totalling 18 actions that can be input in anyway. The process of hacking the target itself is an action in the sequence, and will end the sequence there, thus the sequence can be as long as need but with a max of 18 actions (the hack itself as the last action in sequence). 

 

What is the amount of possible combination I have, and what is the lowest number of sequences I must try out before I hit a successful sequence?

 

TL;DNR : takes this as a long winded lamentation of the RNG in X-com 2 (frigging missed a target at 95% hit chance). Meant to be fun and not really asking for an answer, but I would like to see one if anyone got enough time to waste.

 

Edit: I know this doesn't even account for the the amount of possible locations you can choose for your soldiers on a move action, all of which generate different result for the next roll. But that would be waay too complicate.

Edited by RainDreamer
Link to comment
Share on other sites

Don't play the game like a cheater. Be an Iron Man :P:P

I really advise BeagleRush YouTube channel if you wish to learn how to play.

I've thought I'm an XCOM pro, but learned some tricks.

Love this game. Like mix of chess and russian roulette....

Edited by evileye.x
Link to comment
Share on other sites

A common way of generating random numbers if you don't need repeatability is use the current time as a seed value, this would mean if you do an action, reload from a save, and repeat the exact same action a second later than you did before the outcome could be different.

In models where you want repeatability (ie exactly the same behaviour if you rerun with the same actions) you generate a sequence of psudo random numbers and work through them in order, however the whole point of a random sequence is you could run a near infinite number of them and still not get a particular number.

Apologies if this is sucking eggs territory, but your best bet is to have a backup plan, ie someone else available to have another go.  If the chance of any individual attempt succeeding is 35% then the overall chance of success is 1-(1-0.35)n where n is the number of attempts you make, so it takes 7 attempts to hit 95% chance of success.

Link to comment
Share on other sites

Oh I know that, I always have plans to fall back in case my soldiers fail, and make frequent saves. But I was wondering about the possible combinations I could do if I just reload and change slightly my action sequences. You know, like when you have the power to rewind time, just a bit more predictable?

Link to comment
Share on other sites

Seed for the map is generated when the map initially loads. The numbers you're going to get and the order they come in is determined from the drop.

Movement, pickups, and anything that doesn't involve a roll do NOT use numbers in the seed. Firing will have the exact same result regardless of whether you move a character before the shot or not. So the number of rolls you can go through in a turn is actually quite lower (one of the hidden benefits of the sharpshooter with the pistol upgrades is that they can sometimes get 5-6 shots in a turn, burning through a lot of numbers if you need to).

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...