This project provides an OpenAI Gym environment for training reinforcement learning agents on an XPlane simulator. The environment allows agents to control an aircraft and receive rewards based on how well they perform a task, such as flying a certain trajectory or landing safely.
To install the package, run the following command:
pip install airgym
To use the environment in your Python code, you can import it as follows:
import airgym
import gym
# If XPlane is running on the same machine, you can use the default address and port.
# Or, set ip address and port according to your configuration.
env = gym.make('AirGym-v1')
episods = 0
for episod in range(episods):
obs = env.reset()
done = False
while not done:
actions = env.action_space.sample()
obs, reward, done, info = env.step(action)
env.close()