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.73k stars 306 forks source link

how can I reduce solving time? #158

Closed nguyenviettuan96 closed 1 year ago

nguyenviettuan96 commented 1 year ago

Happy new year from vietnam. Do you have any idea to run solver on GPU ?

bupticybee commented 1 year ago

Running on GPU is a great idea, however I'm afraid noone is able to get a good speedup from running cfr algorithms on gpu at this point of time. Read a few paper about it, for now there is no such algorithm that can run cfr on GPU and get a good speedup.

Thomas-MMJ commented 1 year ago

Running on GPU is a great idea, however I'm afraid noone is able to get a good speedup from running cfr algorithms on gpu at this point of time. Read a few paper about it, for now there is no such algorithm that can run cfr on GPU and get a good speedup.

I believe you are mistaken,

see

As the game’s size grows bigger, the difference between the CPU and GPU implementation becomes more and more apparent. On Goofspiel 3, the GPU implementation is about five times faster than the CPU implementation. On Goofspiel 4, the GPU implementation is about 47 times faster than the CPU implementation.

https://cent.felk.cvut.cz/courses/GPU/archives/2020-2021/W/rudolja1/

Source code, development report, etc. are all available at the link.

Same author - code is in git, is Vanilla CFR, supports multiple GPUs,

https://github.com/janrvdolf/gpucfr

bupticybee commented 1 year ago

Running on GPU is a great idea, however I'm afraid noone is able to get a good speedup from running cfr algorithms on gpu at this point of time. Read a few paper about it, for now there is no such algorithm that can run cfr on GPU and get a good speedup.

I believe you are mistaken,

see

As the game’s size grows bigger, the difference between the CPU and GPU implementation becomes more and more apparent. On Goofspiel 3, the GPU implementation is about five times faster than the CPU implementation. On Goofspiel 4, the GPU implementation is about 47 times faster than the CPU implementation.

https://cent.felk.cvut.cz/courses/GPU/archives/2020-2021/W/rudolja1/

Source code, development report, etc. are all available at the link.

Same author - code is in git, is Vanilla CFR, supports multiple GPUs,

https://github.com/janrvdolf/gpucfr

Wow, that's new. That's the first claim I saw that claims achieve a good speedup. Wonder whether anyone can replicate or confirm this speedup.

If it can still achieve a good speedup compair to a fast enough baseline (for example, a solid solver) then it would be interesting to see it used in texas holdem.

Thomas-MMJ commented 1 year ago

This might be of interest, a discussion by a pytorch dev on GPU optimization,

https://horace.io/brrr_intro.html

deflexor commented 1 year ago

Hi, as an option I guess is to get more CPUs and cores instead of GPU ?

bupticybee commented 1 year ago

Hi, as an option I guess is to get more CPUs and cores instead of GPU ?

For now, in this project, yes.