-
Notifications
You must be signed in to change notification settings - Fork 10
Hand Indexer Usage #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If it is used but only for non-core functionality (evaluator and equity calc), perhaps we could enable it via a feature? |
Hand Indexer isn't used for the equity calculation. It's instead used for card abstraction in the actual poker solver. It maps isomorphic hands into the same index with no holes so AhKh maps to the same index as AsKs preflop. I think you're right enabling it via a feature could be a good solution. I'll look into that as well as the C compiler errors that you're getting |
I've been looking around and it seems like there is no way to compile rust -> wasm with a static c library. So I've created a workspace and moved hand_indexer to its own module which can be enabled with a feature. I've also made a few other changes. I'm new to features so take a look and let me know |
Another thing, the cargo build now generates the entire hand evaluation table. The idea is the you can serve these as assets to your web app so they can be found on the client side by your wasm module |
very nice! I ran into a couple of issues when trying to get it working with WASM:
I played about and got it working by not using crossbeam when on WASM and generating the evaluation table at runtime. It'd be cool to get it working with WASM but I think it might need too many changes and might make the code a bit horrible by littering it with all sorts of platform arch checks? I did also get this deployed as a Lambda function and it worked perfectly! |
I agree, I think using a lambda function or querying a rust web server is the way to go. Building the evaluation table may take too much time and use too much memory, and even if you could get the wasm to load the files that would mean the client has to download a ~200kb file |
Uh oh!
There was an error while loading. Please reload this page.
Just wondering how is the hand indexer being used and if it is actually required? I'm building the lib for use with WASM and getting a bunch of C compiler errors when targeting wasm32-unknown-unknown. the issues seem to be compiler errors (possibly relating to clang version and wasm or general rust+C+WASM interoperability) rather than an issue with this lib. I'll look into fixing those but in the meantime I couldn't see how the hand indexer is being used?
The text was updated successfully, but these errors were encountered: