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

Add Gymnasium client #18

Merged
merged 47 commits into from
Feb 14, 2024
Merged

Add Gymnasium client #18

merged 47 commits into from
Feb 14, 2024

Conversation

siboehm
Copy link
Contributor

@siboehm siboehm commented Jan 17, 2024

closes #12

@siboehm siboehm requested a review from garymm January 17, 2024 23:14
Copy link
Member

@garymm garymm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went through the first two commits only.

.gitmodules Outdated
@@ -0,0 +1,7 @@
[submodule "lib/SDL"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use CMake to fetch these instead?
An example from a CMakeLists.txt file I wrote for something else:

include(FetchContent)
FetchContent_Declare(
  ut
  GIT_REPOSITORY https://github.com/boost-ext/ut
  GIT_TAG        20f2c3f811e25b8c398c6e98545dbf07d72eb4e8
)
FetchContent_MakeAvailable(ut)

I don't have a lot experience with it but it seems maybe better if we don't expect users to edit the source of these at all. I guess at least for SDL we don't expect to edit it at all. irrlictmt maybe we will need to edit it?
Thoughts?

Copy link
Member

@garymm garymm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went only through 3rd commit adding remote client.

Can you add a README.astera.md in the root that summarizes the changes we've made in our fork?

.gitmodules Outdated
@@ -1,3 +1,6 @@
[submodule "lib/zmqpp"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one also seems better to use CMake since we don't expect to modify it

include_directories(${CAPNP_INCLUDE_DIRS})
get_filename_component(PROTO_PARENT ${PROJECT_SOURCE_DIR}/.. ABSOLUTE)
file(GLOB PROTO_FILES ${PROTO_PARENT}/src/network/proto/*.capnp)
# set(CAPNPC_OUTPUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

# TODO error handling
message(STATUS "Cap'n Proto enabled.")
find_package(CapnProto CONFIG REQUIRED)
message(STATUS "Cap'n Proto include dir: ${CAPNP_INCLUDE_DIRS}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete

@@ -0,0 +1,41 @@
option(ENABLE_SYSTEM_ZMQPP "Use ZMQPP from system" TRUE)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should to support both system and submodule. I think the submodule way is better in general, but most other dependencies are system deps so maybe more consistent for now to just support a system dep?

Copy link
Contributor Author

@siboehm siboehm Jan 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Thing to note here is that zmqpp is not packaged for Ubuntu, but exists in brew. So this makes the installation process on infra somewhat more annoying, since you have to build & install from source.

Copy link
Member

@garymm garymm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, done. That was a lot of code. So sad I won't be reviewing any more of your code 😢

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the devtest game instead?

Change-Id: Ifdaeb008b7cdc789044a7c49baa528df8962e70f
Change-Id: Ib31ff36503d7c5bc8f13f5f3811bd5dd7b6ee5d8
Change-Id: Ied9c594630d586b9ad397d9bb8e8fa8783f40591
Change-Id: I960b7c451c95f5ce958a5301f825a113cf363f29
@garymm garymm force-pushed the siboehm/gymInterfaceSAVEGAME2 branch 3 times, most recently from 12beed5 to 2a0af30 Compare January 31, 2024 23:53
@garymm garymm force-pushed the siboehm/gymInterfaceSAVEGAME2 branch from fb8fbd1 to 7f90675 Compare February 2, 2024 23:37
@garymm garymm force-pushed the siboehm/gymInterfaceSAVEGAME2 branch from 3db6865 to 0ff052b Compare February 3, 2024 00:27
garymm and others added 3 commits February 6, 2024 23:26
Change-Id: Ia6580817d446f9863f8a3586f84afa1e8867b244
Best to not have it as default as I don't understand
everything it does.
@garymm garymm force-pushed the siboehm/gymInterfaceSAVEGAME2 branch from 0ff052b to e4abb75 Compare February 6, 2024 23:41
It seems there is some asynchronous initialization that sometimes results
in observations with mostly grey background and no reward. Work-around
by attempting to detect and retry in MinetestEnv.reset().

Also in the mod have the reward initialized 1 in the mod because sometimes we were
seeing the first observation have it set to 0.
@garymm garymm force-pushed the siboehm/gymInterfaceSAVEGAME2 branch 13 times, most recently from 10db0fd to 62a7646 Compare February 13, 2024 23:49
Get almost all dependencies from anaconda rather than
apt-get. I think this will make it easier to build an anaconda package.
@garymm garymm force-pushed the siboehm/gymInterfaceSAVEGAME2 branch from 62a7646 to bbbe3f4 Compare February 14, 2024 00:06
@garymm garymm merged commit b4f270c into master Feb 14, 2024
20 checks passed
@garymm garymm deleted the siboehm/gymInterfaceSAVEGAME2 branch February 14, 2024 00:28
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.

Minetest Gymnasium interface v0
2 participants