Need to find the odds for my game

  • Context: High School 
  • Thread starter Thread starter Alanay
  • Start date Start date
  • Tags Tags
    Game
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
Alanay
Messages
61
Reaction score
4
Okay so I have made a game, it's a grid 10x10 going from 0-99. I need to find out the odds going up from 1 to 9 numbers. 9 is the limit or else it's possible for them to go in a diagonal line across the board and lose every time. That's because after 5-10 seconds a line will appear destroying 10 blocks going vertically or horizontally. So there's a 1-100 chance any number will be chosen, then there's a 50/50 chance it will go vertically or horizontally, if I chose just the number 0 do I have a 10% chance to lose? Because there's a 1% chance right off the bat it will get chosen, then 18% chance one of the blocks adjacent to it will be chosen, then the 18% halves because it can got in the other direction. Can someone check my math or give me a way to figure this out please?

You can play a demo of the game here to understand better: http://codepen.io/sotacan/pen/MeKEjY

Click on 1-9 numbers and just hit confirm, then wait for the line to fully appear.
 
Physics news on Phys.org
Alanay said:
if I chose just the number 0 do I have a 10% chance to lose?
Yes. In that case there is an even easier calculation: all cells are the same (they are in exactly one row and one column), and 10 cells get destroyed, giving a 10% chance that your chosen cell is among them.
 
  • Like
Likes   Reactions: Alanay
mfb said:
Yes. In that case there is an even easier calculation: all cells are the same (they are in exactly one row and one column), and 10 cells get destroyed, giving a 10% chance that your chosen cell is among them.

Thank you, now how would I figure out if they chose say 9 blocks from 0-9 (1-10 shown in the demo)? And they could also do it in a diagonal line, like 1, 10, 12, 21 for example.
 
In the most general case: There are 20 ways to choose a line, they all have the same probability. Go through all of them, check for collisions.