google-deepmind / open_spiel

OpenSpiel is a collection of environments and algorithms for research in general reinforcement learning and search/planning in games.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flag.h do not include

LucasCelestinoSE opened this issue · comments

Greetings, I'm relatively new to programming, so please bear with me if my question appears to be basic. I'm attempting to create a WebAssembly (WASM) using C++ and Python game code. My aim is to run two game examples in WASM and create a template for this purpose.

However, I'm encountering an issue. As can be seen on the referenced page, I'm unable to run the C++ game example (open_spiel/examples/example.cc). It seems like the path to flag.h is not working, and I'm not sure how to fix this.

My open_spiel flag.h tree path.
open_spiel/
--open_spiel/
----abseil-cpp/
------absiel/
--------flags/flag.h

How you can see, the archive flag.h exists, but on the open_spiel/examples/example.cc the compiler signals the error open_spiel/abseil-cpp/absl/flags/flag.h: No such file or directory gcc

Im using VsCode IDE and i installed all depedencies of documentation (Clang++, python3, virtual-env etc)

It would be a workaround trying to compile only that file. Did you follow all instructions for installation? When you execute open_spiel/scripts/build_and_run_tests.sh all code will be compiled and you should see tests passing. Then under the <project_root>/build folder inside the examples folder you can start the programm you wish in your case ./example . Im not sure if the error just happens if you already followed the steps because it wasnt clear out of your post.

Note that there is only limited, experimental support for OpenSpiel on Windows: https://github.com/google-deepmind/open_spiel/blob/master/docs/windows.md

That's likely because your include paths are not set correctly in the project.

Note that there is only limited, experimental support for OpenSpiel on Windows: https://github.com/google-deepmind/open_spiel/blob/master/docs/windows.md

That's likely because your include paths are not set correctly in the project.

I'm using Ubuntu 22.04

It would be a workaround trying to compile only that file. Did you follow all instructions for installation? When you execute open_spiel/scripts/build_and_run_tests.sh all code will be compiled and you should see tests passing. Then under the <project_root>/build folder inside the examples folder you can start the programm you wish in your case ./example . Im not sure if the error just happens if you already followed the steps because it wasnt clear out of your post.

Finally, I managed to run the tests! Thank you, I was able to compile all the C++ examples and generate their executables. I am familiarizing myself with the framework and didn't realize my approach was a "workaround".
I just read about venv and i review the instructions of installation tutorial.

I'm using Ubuntu 22.04

Whoops, I saw VsCode and made some incorrect assumptions. Glad it all worked out for you in the end!