   Question about odds
  I'm working on a poker game and I have code that determines the odds of your hand winning by running through every permutation of possible hands of the remaining cards in the deck and counting how many of these permutations you win against. This should tell me the odds of winning against one opponent. Assuming that this is done correctly, can I then determine the odds of winning against two opponents simply by squaring the percentage of winning against one, and cubing the percentage when up against three, etc...?   
  No, you can't. Squaring will get you the probability of winning against a single opponent twice in a row. This is different from winning once against two opponents.   ;  It sounds like you are calculating the odds of getting the best hand against all other possibile hands, so this is independent of how many opponents there are.Of course, in poker you have better odds of having the best hand the less players are in the game, because on average the best hand will be weaker when less hands are dealt.The only way to calculate the true odds is to calculate all possible permutations of all cards for all players dealt in. So for hold 'em, with 2 opponents you need to calculate the possibilities for the 4 hole cards held by the players instead of just the 2 cards held by one player. That's alot more possibilities however (nearly the square of the original number of possibilities). It's going to get computationally expensive quickly unless you can precalculate (which means calculate the odds for all possible hole cards for yourself vs. the required number of players).   