lfnetwork.com mark read register faq members calendar

Thread: Pazaak Probabilities
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 12-17-2013, 07:17 PM   #1
Mator
Lurker
 
Join Date: Dec 2013
Posts: 3
Pazaak Probabilities

Hello, I'm new here.

I was just returning to Knights of the Old Republic, and I was about to start up Pazaak in Taris again, when I felt the need to seek out what other people's strategies were regarding Pazaak. After reading several pazaak guides/strategies on the internet, I felt woefully unconvinced. I'm starting this thread so I can share my ideas regarding pazaak, and perhaps hear some from other members as well.

So to begin, I decided to use a Monte Carlo simulation to see what I could learn about the probability of getting certain results on a pazaak table. My program is currently pretty simple, so some extrapolation on the produced data will be necessary. To begin, I'm simply rolling random values between 1 and 10 for cards, and playing a game up until the value is greater than or equal to 20, or until there are 9 cards on the table. At this point I store what the value is and simulate a new game of pazaak. I don't think the decks in KOTOR have a finite number of each type of card (though I have heard mention of there being 4 of each card between 1 and 10). In the case that they do have a finite number of each card this simulation may yield different results.


I simulated 100,000 games, and these are my results:
Quote:
-----------------------
Pazaak game tester v0.1
-----------------------
100000 games simulated. Results:
Busts: 81756
g10: 23678
g11: 16053
g12: 16687
g13: 16985
g14: 17681
g15: 17876
g16: 18237
g17: 18544
g18: 18785
g19: 18774
g20: 18242
g21: 16018
g22: 14241
g23: 12586
g24: 10973
g25: 9205
g26: 7485
g27: 5618
g28: 3736
g29: 1894
g30: 0
gDouble: 25532
--Rolls--
r1: 41815
r2: 41936
r3: 42199
r4: 41652
r5: 42066
r6: 41997
r7: 41748
r8: 41878
r9: 41651
r10: 42002

A quick explanation of these values:
Busts: Whenever the game doesn't end in a 20, I count the game as a bust. This is why this number is so large, and why this number plus g20 equals the number of games simulated.
g10: Whenever the sum of the cards on the table is 10, I count that as a g10.
g11-g30: Same idea as g10, but with the sums corresponding to the variable name.
gDouble: Whenever a card is thrown such that you can use the "doubling card" from TSL (e.g. a game starting with 10) to win, I increased gDouble.
r1-r10: Just to show that the randomization was working, these values correspond to each time a 1, 2, 3... etc. card was "rolled". As you can tell they're all close to 42,000 (for a total of 418,994 rolls, corresponding to an average of 4.189 cards per game before reaching or exceeding a value of 20).

Obviously there's a lot more work to be done here, but I'm confident that with time we can find the most ideal pazaak hands and from there the most ideal pazaak deck.



--EDIT--
Did some more simulation work and expanded the program's capabilities. Tested 10,000,000 games per card type. The tested card was played whenever table value was such that playing it resulted in total card value of 20, or in the case of subtraction cards, whenever the table value exceeded 20. Direct victories are where using the card resulted in a table value of 20, luck victories are where you used a subtraction card to go below 20 and then got 20 later on in the game.


Card Probability Results:
+6
Victories without using card: 1546561
Test card +6 direct victories: 1756088
Test card +6 luck victories: 0
Chance of victory without using card: 15.47%
Total chance of victory: 33.03%

+5
Victories without using card: 1564440
Test card +5 direct victories: 1800038
Test card +5 luck victories: 0
Chance of victory without using card: 15.64%
Total chance of victory: 33.64%

+4
Victories without using card: 1583265
Test card +4 direct victories: 1834424
Test card +4 luck victories: 0
Chance of victory without using card: 15.83%
Total chance of victory: 34.18%

+3
Victories without using card: 1603384
Test card +3 direct victories: 1859016
Test card +3 luck victories: 0
Chance of victory without using card: 16.03%
Total chance of victory: 34.62%

+2
Victories without using card: 1624613
Test card +2 direct victories: 1862669
Test card +2 luck victories: 0
Chance of victory without using card: 16.24%
Total chance of victory: 34.87%

+1
Victories without using card: 1642042
Test card +1 direct victories: 1857887
Test card +1 luck victories: 0
Chance of victory without using card: 16.42%
Total chance of victory: 35.00%

-6
Victories without using card: 1827851
Test card -6 direct victories: 1343382
Test card -6 luck victories: 755766
Chance of victory without using card: 18.28%
Total chance of victory: 39.27%

-5
Victories without using card: 1828517
Test card -5 direct victories: 1530948
Test card -5 luck victories: 612853
Chance of victory without using card: 18.29%
Total chance of victory: 39.72%

-4
Victories without using card: 1828937
Test card -4 direct victories: 1559155
Test card -4 luck victories: 464965
Chance of victory without using card: 18.29%
Total chance of victory: 38.53%

-3
Victories without using card: 1827270
Test card -3 direct victories: 1578922
Test card -3 luck victories: 310677
Chance of victory without using card: 18.27%
Total chance of victory: 37.17%

-2
Victories without using card: 1825755
Test card -2 direct victories: 1591142
Test card -2 luck victories: 155946
Chance of victory without using card: 18.26%
Total chance of victory: 35.73%

-1
Victories without using card: 1826087
Test card -1 direct victories: 1591168
Test card -1 luck victories: 0
Chance of victory without using card: 18.26%
Total chance of victory: 34.17%

+/-6
Victories without using card: 1546192
Test card +/-6 direct victories: 2893080
Test card +/-6 luck victories: 610858
Chance of victory without using card: 15.46%
Total chance of victory: 50.50%

+/-5
Victories without using card: 1564809
Test card +/-5 direct victories: 2954220
Test card +/-5 luck victories: 497123
Chance of victory without using card: 15.64%
Total chance of victory: 50.16%

+/-4
Victories without using card: 1585434
Test card +/-4 direct victories: 3074411
Test card +/-4 luck victories: 387313
Chance of victory without using card: 15.85%
Total chance of victory: 50.47%

+/-3
Victories without using card: 1603198
Test card +/-3 direct victories: 3165574
Test card +/-3 luck victories: 265437
Chance of victory without using card: 16.03%
Total chance of victory: 50.34%

+/-2
Victories without using card: 1622371
Test card +/-2 direct victories: 3231314
Test card +/-2 luck victories: 136824
Chance of victory without using card: 16.22%
Total chance of victory: 49.91%

+/-1
Victories without using card: 1643193
Test card +/-1 direct victories: 3264196
Test card +/-1 luck victories: 0
Chance of victory without using card: 16.43%
Total chance of victory: 49.07%


Show spoiler


More advanced simulation is still possible, but this is quite a good start.


Results:
  • +/-x cards have the best chance of victory, with +/-4, 5, and 6 having the highest percentages by small margins.
  • Chance of victory without using a card is highest for the lower +/- cards.
  • Getting an 11, or another value less than 15 but more than 10, on the table is less likely than getting a value larger than 15 but less than or equal to 20. (I'm not certain why this is)
  • Cards by total chance of victory: +/-6, +/-4, +/-3, +/-5, +/-2, +/-1, -5, -6, -4, -3, -2, +1, +2, +3, +4, -1, +5, +6

Card Costs:
(from Matthew Brown's Pazaak Guide)

Tatooine
Junix Nard, Cantina

Qty Card Price
--- ------ -----
2 [+/-1] 200c
2 [+/-2] 150c
2 [+/-3] 125c
2 [+/-4] 100c

Korriban
Mika Dorin, Cantina

Qty Card Price
--- ------ -----
1 [+/-1] 300c
1 [+/-2] 225c
1 [+/-3] 187c
1 [+/-4] 150c

Manaan
Shady Rodian, Ahto East

Qty Card Price
--- ------ -----
1 [+/-1] 200c
1 [+/-2] 150c
2 [+/-3] 125c
2 [+1] 100c
1 [-1] 100c
2 [+2] 75c
1 [-2] 75c
3 [+/-6] 50c
3 [+3] 50c
3 [+4] 50c
2 [-3] 25c
2 [-4] 25c
4 [+5] 12c
4 [-5] 12c
5 [+6] 5c
5 [-6] 5c

Dantooine
Crattis Yurkal, Aratech Mercantile

Qty Card Price
--- ------ -----
1 [+/-1] 200c
1 [+/-3] 125c
1 [-2] 75c
1 [+/-5] 75c
1 [-4] 25c
1 [-6] 5c

Dantooine
Sol'aa, Jedi Enclave

Qty Card Price
--- ------ -----
1 [+/-2] 150c
2 [+/-4] 100c
2 [+1] 100c
1 [-1] 100c
3 [+/-5] 75c
2 [+2] 75c
1 [-2] 75c
3 [+3] 50c
3 [+4] 25c
2 [-3] 25c
2 [-4] 25c
4 [+5] 12c
4 [-5] 12c
5 [+6] 5c
5 [+6] 5c

Taris
Uriah, Lower City Cantina
-need a Pazaak deck in order to buy cards from Uriah
inf = infinite/unlimited quantity

Qty Card Price
--- ------ -----
2 [+/-1] 200c
1 [+/-3] 125c
inf [+1] 100c
inf [+2] 75c
inf [-2] 75c
inf [+/-6] 50c
inf [+3] 50c
inf [+4] 25c
inf [-4] 25c
inf [+5] 12c
inf [-5] 12c
inf [+6] 6c
inf [-6] 6c

Taris
Igear, Undercity

Qty Card Price
--- ------ -----
1 [-2] 56c
1 [+2] 56c
1 [-3] 18c


The best deck:
  • -6 cards only cost 6c, and you can buy as many as you want from Uriah. With a 39.27% chance of victory they're a pretty good investment.
  • -5 cards only cost 12c, and you can buy as many as you want from Uriah. With a 39.72% chance of victory they're a pretty good investment, just like -6 cards.
  • +/-6 cards cost 50c. These are the best bang-for-you-buck cards, along with +/-5 cards, which cost 75c apiece.
  • Generally speaking, any +/- cards you can pick up for free should be used. -5 or -6 cards should take up the rest of your deck.
  • A good deck will have a variety of cards because having a duplicate card in your hand limits your options in the game. So the best hand would be +/-6, +/-5, +/-4, and +/-3. Because +/-2 and +/-1 are equally valuable and having them decreases your chances for duplicate cards, I'd say the best deck is: two +/-6 cards, two +/-5 cards, two +/-4 cards, two +/-3 cards, one +/-2, and one +/-1.


Note: Variety is important in a pazaak deck to increase the chances of winning the first few games.

Possible improvements to this investigation: This investigation into Pazaak probabilities could be improved by actually simulating full games with a procedure which decides whether or not to stand based on what another simulation is doing. With two different simulations with two different decks you could simulate actual pazaak games and discover deeper probability behaviors. There's also the fact that my simulation assumed that the pazaak deck in KOTOR had no limit to card types (even though several people have suggested there's 4 of each number 1-10). If I was wrong about this certain values found in my simulations may be slightly off.

Last edited by Mator; 12-18-2013 at 02:48 AM.
Mator is offline   you may: quote & reply,
Old 12-18-2013, 10:01 PM   #2
Mator
Lurker
 
Join Date: Dec 2013
Posts: 3
Hi again!

I've made an entirely new program that actually allows you to put two hands against each other and see which will win. It's still in need of a bit of work, but it's capable of better simulations than before. Here's what it looks like:



The "match" play of 3 games with 1 hand is not yet coded, but soon I'll have written the code to do this as well!

Here's some sample data:
Show spoiler



-Mator

Last edited by Mator; 12-18-2013 at 10:19 PM.
Mator is offline   you may: quote & reply,
Old 12-18-2013, 10:28 PM   #3
LDR
Your Death Angel
 
LDR's Avatar
 
Join Date: Apr 2010
Location: Malachor V
Posts: 1,140
Current Game: Halo 3
Helpful! Roleplayer Imperialist Meatbags Guild Member The Walking Carpets Guild Member 
Even though I don't understand half of this stuff, I just wanted to say that what you're doing is nothing short of amazing. I'm surprised no one else thought of this earlier.

Keep the simulations coming!



Forgive, but never forget. No amount of DLC can take back lying to your fan base. Trust is earned, not downloaded.



My Mods
Current Mod Thread
LDR is offline   you may: quote & reply,
Old 12-19-2013, 12:15 AM   #4
Mator
Lurker
 
Join Date: Dec 2013
Posts: 3
Quote:
Originally Posted by LDR View Post
Even though I don't understand half of this stuff, I just wanted to say that what you're doing is nothing short of amazing. I'm surprised no one else thought of this earlier.

Keep the simulations coming!
Thanks LordDeathRay!

It's really not all that complicated, I'm just having the computer play pazaak games over and over again and seeing what the chance of winning is.

Between yesterday and today I've actually found a few other attempted pazaak simulations, though I don't really agree with their techniques or results. I feel their simulations weren't nearly as in-depth or accurate as mine are.

Anywho, I'll keep working on this until there's no more work to be done, next update will probably be around midnight PST! :P

Last edited by Mator; 12-19-2013 at 12:24 AM.
Mator is offline   you may: quote & reply,
Old 01-04-2014, 08:52 AM   #5
Darth krunchy
Rookie
 
Darth krunchy's Avatar
 
Join Date: Jul 2008
Location: Shermer, Illinois
Posts: 91
This is awesome.


My diapers have gone over to the dark side.
Darth krunchy is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > Knights of the Old Republic > Game Discussion > Republic Newsfeed > Pazaak Probabilities

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:36 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.