meow56 / Kixley

Kixley
1 stars 2 forks source link

Casino #5

Open cbp2170 opened 6 years ago

cbp2170 commented 6 years ago

See the original issue from the old Alpha_Stages repo: https://github.com/Kixley/Alpha_Stages/issues/10. We removed this when Alpha 1.3 broke; I think we should re-add the casino.

cbp2170 commented 6 years ago

Not actually entirely sure that issue has any meaningful information.

meow56 commented 6 years ago

Yeah, definitely. At this point, it's probably easier to just redo the casino from scratch.

cbp2170 commented 6 years ago

Yeah, although we might be able to salvage some of the old code in the drive. Also, I think we should somehow involve Scumbags and Warlords.

meow56 commented 6 years ago

That'd be fun to make. Much easier with the buttons, too.

meow56 commented 6 years ago

Hey, if you need help, I think all my stuff is done.

meow56 commented 6 years ago

Hmm. How should AI work for Scumbags & Warlords? Should it just be a simple "if you have something do it"? Or...

EDIT: For now I've just put it to play the strongest thing it has. Well, my snap decision on what was strongest. The order is:

  1. Play a 12 run.
  2. Play a 6 double.
  3. Play a 5 double.
  4. Play an 8 run.
  5. Play a 4 double.
  6. Play a 3 double.
  7. Play a 4 run.
  8. Play a 2 double.
  9. Play quadruples.
  10. Play triples.
  11. Play doubles.
  12. Play singles.
meow56 commented 6 years ago

For that matter, how does betting work? How do point system.

meow56 commented 6 years ago

And also, when trading, should it just be highest/lowest, or should they get a choice?

cbp2170 commented 6 years ago

So, trading should give a choice, but into the rankings:

I made a google doc for the probability calculations, but I'm having trouble with the double doubles. The math I did generated a greater than 100% change of getting one (which is obviously false), so I tried a Monte Carlo simulation where I generate 100,000 distinct shuffles and see how many have double doubles, but this was throwing weird reference errors. I think the errors are from how I copied your sorting program, as I'm not entirely sure how it works. Anyway, could you look over my math and/or my Monte Carlo simulation and try to fix whatever errors I made? I uploaded the Monte Carlo simulation as a txt because GitHub didn't seem to support me uploading .js files. Monte-Carlo-Double-Double-Prob.txt

meow56 commented 6 years ago

Couldn't find the math error, but I got the program working. ddoubles.txt

Might take a while, that's natural.

Runs each set of 10000 5 times total, then averages the results.

Got a value of 954...

Means 4770 out of 50000 are ddoubles...

Giving a rate of ~9.54%?

...oh wait... that's just the value i got above...

cbp2170 commented 6 years ago

Wait, isn't it running 500000 times, not 50000 times? Also the reason you got the same number is probably because we have results / iterations at the end, so they are literally the same number. But, .954% (adjusted for 500000 vs. 50000) is waaaaayyy less than 3.43% (quad chance), and either way, 9.54% is also significantly lower than 42.25%, so you'd think I'd have alreаdy suspected a massive probability difference just from playing experience. This leads to a few options: a) we did something wrong with the simulator. b) my run of 4 math is off (although I think it seems realistic based on playing). c) I am crazy and didn't notice the massive probability difference. d) I (and everyone I've played 4-person games with) am really lucky and got a ton of extra double doubles. In my experience playing the game, I'd say out of the three, quads are by far the least common, then slightly fewer double doubles than runs of four, but both significantly higher. Maybe you should check my run of four math?

cbp2170 commented 6 years ago

Also as a side note, it seems based on commit titles you got the slots in. Not enough time to test right now, so if they work, can you click the button in the checklist?

meow56 commented 6 years ago

Sadly, the slots are not done. Wasn't sure how they would work.

You're right, it is running 500000 times.

I'll be honest, probability is not my strong suit...

Oh no i goofed. findscumbags wants it sorted, not shuffled! Jeez, I guess when you run 100000 iterations, even improbable things happen...

Okay, updated numbers: ddoubles are 13.6056%. I also used the quads to check my work, and they work out! ~3.4162%. Finally, runs are ~9.811%?

EDIT: Here's the code. ddoubles.txt

cbp2170 commented 6 years ago

Can you give me the updated program so I can test runs more?

meow56 commented 6 years ago

Sorry, edited.

cbp2170 commented 6 years ago

Alright so, we should make a final decision on whether this should go in the Inn or as a separate thing available from the town.

My vote:

Your vote:

meow56 commented 6 years ago

Hey, when does S&W end? And how does the points affect betting and stuff?

cbp2170 commented 5 years ago

Uhhhhhhhh, S&W ends when it ends normally, but I'd say like 4-6 rounds in a game for betting.

meow56 commented 5 years ago

;-; Yeah, but what should getting first net you???

meow56 commented 5 years ago

Alright, I'll just say...

Getting first: 2 Getting second: 1 (ie no change) Getting third: 0.5 Getting fourth: 0