Skip to content

sushant1212/Credit-Assignment

Repository files navigation

Credit-Assignment

Environment:

  • It is a modification of the Simple Spread environment from PettingZoo
  • Usage:
import simple_spread_custom
import numpy as np

env = simple_spread_custom.env(max_cycles=100, render_mode="human")
env.reset()
done = False
for agent in env.agent_iter():
    global_state = env.state()  # if you want to use the global state
    obs, rew, termination, truncation, info = env.last()
    if truncation:
        env.step(None)
    else:
        env.step(np.random.randint(1, 5))  # taking a random action

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages