Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reroll procedure should not depend on game.actor.human #233

Open
mrbermell opened this issue May 17, 2022 · 0 comments
Open

Reroll procedure should not depend on game.actor.human #233

mrbermell opened this issue May 17, 2022 · 0 comments

Comments

@mrbermell
Copy link
Collaborator

(as raised by user AurelianTactics on Discord)

The Reroll-procedure is looking at self.game.get_team_agent(self.player.team).human when determining which the available actions shall be. This means you get different behavior of the game class depending on these two situations.

Scenario 1:

game = Game(...) 
agent = MyAgent(...) 
agent.human = True 
game.replace_home_agent(agent) 
game.init()  
while not game.state.game_over: 
    action = agent.act(game) 
    game.step(action)
assert game.state.game_over

Scenario 2:

game = Game(...) 
agent = MyAgent(...) 
agent.human = False 
game.replace_home_agent(agent) 
game.init()  
assert game.state.game_over

This is confusing and the user should be given the freedom to step the game in a convenient way. There are workarounds but they are neither obvious nor straight-forward to the average user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant