Header Ads Widget

Ticker

6/recent/ticker-posts

ok time for cards math

CARDS MATH

dice math is platonic, and mostly in dice math we deal with small numbers. we dont multiply, we add and subtract. multiplication quickly gives you too-large numbers.

poker math is american, revolutionary french, mamluk - and more than this. invented by the chinese. old as paper. the poker math, its not platonic. its exponential.

exponents are hard to store on a computer, but the number 52! is actually much like the number 52. so we can do arithmetic on exponents, and we just have to remember the index.  just treat 52! as 52 for exponent purposes, you can store the number 52. easy.

do you know how data works? its a bunch of bits in a series, bits are either 1 or 0.

a 32 bit number is like

00000000 00000000 00000000 00000001

thats the number 1. the highest number we can represent is:

2 * 2 * 2 * 2 * 2 * ... 32 times. 2 ^ 32.

EXPONENTS
how many different hands are there in poker?

how big is 52! truncated to 5 cards -- i'll tell you. it's like

52 * 51 * 50 * 49 * 48 ( which is 52! - 47!, which is larger than 2 ^ 32 if i remember rightly )

cant do that on a calculator. too many numbers.  but its very easy to do with a deck of cards. a deck of cards is a stack of qbits; and more than this, a stack of any length. the quantum computer is as old as paper.

thats the number of possible hands you can be dealt in poker. it's a too-big number. doesnt fit in 32 bits. so if we wish to calculate the probabilities we will need a large number library  -- or we can use excel or something. everybody can have free spreadsheets now, through google, they probably do large exponents too, i havent checked. in any case you can do the math on the indexes themselves, often. this is probably easier.

MAPS

cards is a space, with dimensions and shit like that. its like: suits * ranks. for each suit one card from each rank. for each rank one card from each suit.

ranks are like numbers + faces

suits are like red + black,but notice that the four suits form a quadrad: its one red for each black and one black for each red. but its also one weak card for each strong and one strong for each weak. what i mean is (clubs and diamonds) are weak, and (hearts and spades) are strong. It's hard to say whether red or black is stronger though. different games rank the suits in different orders. this is fine.

 we can easily make an alternate game where diamonds are strong and hearts are weak. it really depends on what you want to do. in any case a poker deck is an easy structure to build in code. its just four ordered sets of the same 13 cards. plus two jokers lets not forget, wildcards are important too. so we get to 54! truly.  that is, if you deal out all the cards of a poker deck, you get 54! possible orders. these are permutations though, not combinations. i have been lying to you. combinations are a little bit tricky, but not really. you can figure it out. i prefer to work with permutations because i like considering the order the cards come out.

the order doesnt really matter at all: the same five cards are the same five cards no matter which order they come out. i mean maybe in texas hold em but in the other traditional poker i just deal you five cards and you bargain with them. nobody knows what you have.

next: the tarot.

Yorum Gönder

0 Yorumlar