soulsgym

Contents

soulsgym#

The soulsgym package is a collection of Gymnasium environments for Dark Souls III.

Its high-level objective is to provide Souls games boss fights as reinforcement learning environments. These environments are located in the soulsgym.envs module. It is structured into a core environment that is subclassed into an individual environment for each available boss fight. SoulsGym uses the Souls games, e.g. Dark Souls III or Elden Ring, as the underlying engine that is modified at runtime by reading and writing into the game memory to create the environments.

Note

The environments only cover one phase of the boss fights so far. For further explanations see envs.

We also provide a demo environment. This environment is meant to test the agent on a single episode of the full boss fight.

The Souls games have no API for developers to modify the game. Therefore, soulsgym has to hack the games instead. The core hacking and interactions tools are located in the soulsgym.core module. Unless you want to develop your own environment for envs or are trying to contribute, this module can safely be ignored.

As an intermediate layer between the core module and the environments, the soulsgym.games module provides a game class for each of the Souls games that is used to seamlessly interact with the games as if they were regular Python objects. This immensely simplifies the development of new environments.

soulsgym registers its environments with the gymnasium module on import. In order to use the environments you follow the usual pattern of gymnasium.make. A list of all available environments is available at soulsgym.available_envs.

soulsgym.set_log_level(level: int)#

Set log level for the soulsgym module.

Parameters:

level – Logger level for the module. Uses the standard library logging module levels.