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

python port #30

Closed
vors opened this issue Sep 10, 2017 · 7 comments
Closed

python port #30

vors opened this issue Sep 10, 2017 · 7 comments

Comments

@vors
Copy link
Contributor

vors commented Sep 10, 2017

Hello, David!

I'm curious about your thoughts on https://github.com/deepmind/pysc2 and an option to align commandcenter-based AI and the pysc2 training agents, for some interop maybe?
My interest in this question arises from the fact that I'd love to use awesome primitives you built in the commandcenter, but at the same time, I'd love to have the flexibility to plug in all the RL training stuff that deepmind team provided. Also doing it casually in Python would be somewhat easier than in c++ for me and possibly some other sc2 enthusiasts.

@davechurchill
Copy link
Owner

If someone does something involving pysc2 / commandcenter and wants to pull request what they did, I would be happy to review it, but I have no plans of doing anything but C++ with CommandCenter for the foreseeable future

@alkurbatov
Copy link
Contributor

The problem is that there is no direct connection between the c++ code and the Python code. From my point of view the only thing that could be done here is creation of the Python bindings over Python API that will allow to use CommandCenter in Python apps. However it is a hard work to support such bindings in actul state.

@vors
Copy link
Contributor Author

vors commented Sep 11, 2017

@alkurbatov yes, that's my understanding too. It would be doable if we can keep an API surface, but it's additional restrictions. I was more thinking along the lines of rewriting the whole project in python for the sake of interop.

@davechurchill
Copy link
Owner

Seems like a lot of work to avoid learning a little C++? :D

@vors
Copy link
Contributor Author

vors commented Sep 11, 2017

lol sure

My hypothesis is that having 2 projects for the sc2 research that can reuse each other is better than having 2 projects that have no way to interact and can lead to more interesting results. But I don't have any data to prove it.

@davechurchill
Copy link
Owner

True - I just don't have an immediate use for it so I'm going to bow out of any responsibility for it :)

I suspected that using some sort of python / c++ interop may be the easiest way of going about it

@alkurbatov
Copy link
Contributor

alkurbatov commented Sep 11, 2017

@vors I did such things for more complicated C-like API. We used handmade codegenerator to analyze C++ code and create Python bindings (each of which converted arguments and executed a C++ function). While the codegenerator allows to reduce support burden (i.e. just recompile everything when needed) on the other hand we have to support the codegenerator and expand it for some complex datatypes, and fix leaks in the generated code.

I am not sure if such approach is applicable here but it could be an option too.

However according to the experience of the large and complex projects (e.g. libvirt): they usually implement separate Python API which use C-function calls, write everything manually and cover the API with tests as much as possible.

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

No branches or pull requests

3 participants