bupticybee / TexasSolver

🚀 A very efficient Texas Holdem GTO solver :spades::hearts::clubs::diamonds:
https://bupticybee.github.io/texassolver_page
GNU Affero General Public License v3.0
1.71k stars 304 forks source link

segfault in --mode shortdeck #38

Closed noname72 closed 3 years ago

noname72 commented 3 years ago

Try to run solver with --mode shortdeck, but it fails. Can you please help?

root@:~/TexasSolver-Linux# ./console_solver -i resources/text/commandline_sample_input.txt --mode shortdeck EXEC FROM FILE [##################################################] 100% <<<START SOLVING>>> Using 8 threads Iter: 0 Segmentation fault (core dumped) This is commandline file that I use:

noname72 commented 3 years ago

commandline_sample_input.txt

bupticybee commented 3 years ago

I havn't done the full test on shortdeck for now, I mean that's part of the reason I didn't mention any command about shortdeck in project readme. Glad you find it on code.

For now I suggest wait till the next release, by that time, shortdeck should be fully and offically supported (that should happen in one or two weeks).

Now only holdem mode is offically supported.

noname72 commented 3 years ago

Hey, thanks for the clarification! By the the way, as I can see now in the code "shortdeck" mode is just reduced deck to 36 cards. But nowadays the most popular modification of this game has additional differences from NLH in rules:

I believe that implementation in this solver will be incorrect without these options included :)

bupticybee commented 3 years ago

Hey, thanks for the clarification! By the the way, as I can see now in the code "shortdeck" mode is just reduced deck to 36 cards. But nowadays the most popular modification of this game has additional differences from NLH in rules:

  • Flush beats FullHouse (because FH is noticeably easier to collect - pocket pair chances to flop a set is 17%)
  • Ace can be either lowest card or highest card: so lowest street is A 6 7 8 9
  • There is Ante in the game that has some dramatic effect to the EV :)
  • Set beats Straight (PS, but this is optional)

I believe that implementation in this solver will be incorrect without these options included :)

You dig deep, but you clearly didn't dig deep enough, I already know and code all these into the solver (except the Ante, still don't know what it is), as you might notice two mode (shortdeck and holdem) use different compairer file.

I reference to another my project https://github.com/bupticybee/deuces/tree/shortdeck in it's shordeck branch, I implemented the following rule you mentioned:

The shortdeck mode's compairer file is generated by my project I mentioned above, so, it's 100% correct.

Not to mention that I have done a compair experiment with another private shortdeck solver, and under the same setting, their strategy is very very close (difference < 0.1%)

As a matter of fact, the entire project started to be a private commercial shortdeck solver (I mean the good old java version), I added the support for holem and opensource it later. You can't except me to write a shortdeck solver without any knowledge about shortdeck rule right?

noname72 commented 3 years ago

I'm really sorry! Now I see that I don't understand the project well enough :)

Anyway, now this is 100% clear that shortdeck support is implemented and just a matter of time when it start to work in this project.

bupticybee commented 3 years ago

I'm really sorry! Now I see that I don't understand the project well enough :)

Anyway, now this is 100% clear that shortdeck support is implemented and just a matter of time when it start to work in this project.

Yes, actually the shortdeck mode is offically supported in the java version right now. You can try that one first. I already transfer code the c++ version but just still didn't test it on shortdeck mode just yet. Please wait for my good news.

noname72 commented 3 years ago

Yes, actually the shortdeck mode is offically supported in the java version right now. You can try that one first. I already transfer code the c++ version but just still didn't test it on shortdeck mode just yet. Please wait for my good news.

Yep, already tried your shortdeck solver in Java. Very neat and precise tool, but have found some Bugs with UI on Windows when try to see a result... Will try a console interface!

bupticybee commented 3 years ago

I fixed this bug just now 6839506f87f82523efc1380f0f620bda62a1c0c8

use this branch: https://github.com/bupticybee/TexasSolver/tree/iso

I run with your commandline_sample_input.txt in shortdeck mode and it worked.

Can you compile this branch and verify the bug has disappeared?

noname72 commented 3 years ago

Yes, I can verify that bug has disappeared.