amacati / SoulsGym

Gymnasium extension for DarkSouls III, Elden Ring, and other Souls games
MIT License
115 stars 9 forks source link

soulsgym no value #50

Open VeN0mYT opened 2 weeks ago

VeN0mYT commented 2 weeks ago

iam new to this and i wanted to learn how to make ai like this but when i try the test.py its shows this error

ERROR: The function received no value for the required argument: boss Usage: test.py BOSS

For detailed information on this command, run: test.py --help

which i dont understanding it

amacati commented 1 week ago

The script you are trying to use takes an argument for the boss ID. You can either invoke it with

python test.py --boss Iudex

or write your own minimal testing script:

import gymnasium
import soulsgym

env = gymnasium.make("SoulsGymIudex-v0")
obs, info = env.reset()

while True :
    action = env.action_space.sample()
    next_obs, reward, terminated, truncated, info = env.step(action)
    if terminated or truncated:
        break

env.close()
VeN0mYT commented 1 week ago

is there a specific version from the windowcapture library becuze when i try to run the sample it showes this error

Traceback (most recent call last): File "g:\ai for ds3\SoulsGym-master\hah.py", line 3, in from soulsgym.core.game_window.window_capture import WindowCapture File "g:\ai for ds3\SoulsGym-master\soulsgym\core\game_window__init__.py", line 3, in from soulsgym.core.game_window.game_window import GameWindow
File "g:\ai for ds3\SoulsGym-master\soulsgym\core\game_window\game_window.py", line 20, in from soulsgym.core.game_window.window_capture import WindowCapture File "g:\ai for ds3\SoulsGym-master\soulsgym\core\game_window\window_capture.py", line 8, in from soulsgym.core.game_window._C.window_capture import WindowCapture as _WindowCapture ImportError: DLL load failed while importing window_capture: The specified module could not be found.

amacati commented 1 week ago

Have you installed the library via pip or directly from GitHub? In the latter case, you may want to try the dev branch. It replaces the previous window capture mechanism with pixel_forge and should fix any issues with the game_window module.

VeN0mYT commented 1 week ago

i installed it as pip but i dont know how i get dev branch or how i can use pixel forge wiht it but i think the proplem is something with the compatiplity of c++ dll of windowcapture with the code or it missing

after searching in files i found that in window_capture.h it cant access this headers

include "pybind11-global/pybind11/pybind11.h"

include "pybind11-global/pybind11/numpy.h"

and also module.cpp

include "pch.h"

include "window_capture.h"

include <pybind11-global/pybind11/pybind11.h>

amacati commented 1 week ago

You can download this repository with git clone https://github.com/amacati/SoulsGym.git, then go into the repository, switch to the dev branch (git checkout dev) and install it (pip install .).