edbeeching / godot_rl_agents

An Open Source package that allows video game creators, AI researchers and hobbyists the opportunity to learn complex behaviors for their Non Player Characters or agents
MIT License
902 stars 63 forks source link

The Examples do not Work for OSX #189

Closed MichaelrMentele closed 2 months ago

MichaelrMentele commented 2 months ago

When going through the quickstart the examples do not have a .app build for OSX. What this means is if you try to do the quickstart you will get an error message running the *64_86 build (at least for JumperHard which the instructions in the quickstart reference) and the error message is opaque.

You will see an error like so:

(godot_rl_exp) ➜  droids-godot-poc python $(which gdrl) --env=gdrl --env_path=examples/godot_rl_JumperHard/bin/JumperHard.x86_64 --experiment_name=Experiment_01 --viz

Traceback (most recent call last):
  File "/Users/michaelmentele/opt/anaconda3/bin/gdrl", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/Users/michaelmentele/miniforge3/envs/godot_rl_exp/lib/python3.12/site-packages/godot_rl/main.py", line 110, in main
    training_function(args, extras)
  File "/Users/michaelmentele/miniforge3/envs/godot_rl_exp/lib/python3.12/site-packages/godot_rl/wrappers/stable_baselines_wrapper.py", line 140, in stable_baselines_training
    env = StableBaselinesGodotEnv(env_path=args.env_path, show_window=args.viz, speedup=args.speedup, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/michaelmentele/miniforge3/envs/godot_rl_exp/lib/python3.12/site-packages/godot_rl/wrappers/stable_baselines_wrapper.py", line 24, in __init__
    GodotEnv(env_path=env_path, convert_action_space=True, port=port + p, seed=seed + p, **kwargs)
  File "/Users/michaelmentele/miniforge3/envs/godot_rl_exp/lib/python3.12/site-packages/godot_rl/core/godot_env.py", line 53, in __init__
    self.check_platform(env_path)
  File "/Users/michaelmentele/miniforge3/envs/godot_rl_exp/lib/python3.12/site-packages/godot_rl/core/godot_env.py", line 116, in check_platform
    assert os.path.exists(filename)
           ^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError

Solutions

edbeeching commented 2 months ago

Hi @MichaelrMentele , thanks for your feedback. I only develop on Linux and occasionally on Windows so I have no way to test Mac support. It should work if you build the envs yourself or in interactive mode.

There is a PR that added build files for mac but I have no tested it.

We would welcome PRs from Mac users to fix this issue!