Skip to content
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

InfostateTree python bind #1054

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

maichmueller
Copy link
Contributor

This PR would bring bindings for the infostate tree class to the python module pyspiel.

The following classes would be bound by this PR:

InfostateTree
InfostateTreeNode
InfostateNodeType (enum)

TreeplexVector< double >
LeafVector< double >
DecisionVector< double>

TreeplexVector< py::object >
LeafVector< py::object >
DecisionVector< py::object >

SequenceId
DecisionId
LeafId

Range< SequenceId >
Range< DecisionId >
Range < LeafId >

kUndefinedDecisionId (constant)
kUndefinedLeafId (constant)
kUndefinedSequenceId (constant)
kDummyRootNodeInfostate (constant)
kFillerInfostate (constant)

@google-cla
Copy link

google-cla bot commented Apr 17, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@maichmueller
Copy link
Contributor Author

maichmueller commented Apr 17, 2023

I have been unsure with how to bind the InfostateNode class correctly, since it doesn't have a public constructor and is constructed only by the tree. Since the tree exposes the nodes to the client, I exported the node class as well. I opted to go for a std unique ptr mock as smart holder which does not manage the lifetime but acts like one (yet remains being copyable).

Edit: the python bindings are correctly recognized, it was an error in my env setup.

@maichmueller maichmueller marked this pull request as ready for review April 21, 2023 14:26
@maichmueller maichmueller changed the title InfostateTree python bind. InfostateTree python bind May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant