Need to find the odds for my game

  • #1
61
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 accross 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.
 

Answers and Replies

  • #2
35,261
11,513
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 Alanay
  • #3
61
4
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.
 
  • #4
35,261
11,513
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.
 

Related Threads on Need to find the odds for my game

  • Last Post
2
Replies
33
Views
11K
  • Last Post
Replies
3
Views
1K
  • Last Post
12
Replies
291
Views
137K
  • Last Post
Replies
9
Views
6K
  • Last Post
2
Replies
26
Views
14K
  • Last Post
Replies
1
Views
638
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
4
Views
1K
  • Last Post
Replies
1
Views
1K
Replies
9
Views
1K
Top