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

How to implement different types of food, that gets consumed one by one. Or: How to prevent sampling to stop too early. #42

Open
jposor opened this issue Sep 17, 2018 · 0 comments

Comments

@jposor
Copy link

jposor commented Sep 17, 2018

Hey, thanks for publishing this great platform!

Question: During --train mode, sampling seems to stop, if there's no agent of e.g. g_f left. Any tips how to prevent this / implement many different types of agents which get consumed one by one?

Use case: I tried to add food with different types of value to train_gather.py to see if agents gather the more valuable food first. Unfortunately I'm not able to set this up, because sampling simply stops when one of the food agents has been used up.

    g_s = cfg.add_group(agent)
    g_f = cfg.add_group(food)
    g_f_2 = cfg.add_group(food)

    a = gw.AgentSymbol(g_s, index='any')
    b = gw.AgentSymbol(g_f, index='any')
    c = gw.AgentSymbol(g_f_2, index='any')

    cfg.add_reward_rule(gw.Event(a, 'attack', b), receiver=a, value=5.0)
    cfg.add_reward_rule(gw.Event(a, 'attack', c), receiver=a, value=1.0)

Thank you!

@jposor jposor changed the title How to implement different types of food, that gets consumed one by one. Or: How to prevent sampling to stop to early. How to implement different types of food, that gets consumed one by one. Or: How to prevent sampling to stop too early. Sep 17, 2018
@Kipsora Kipsora assigned Kipsora and merrymercy and unassigned Kipsora and merrymercy Nov 20, 2018
@merrymercy merrymercy removed their assignment Mar 9, 2019
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

3 participants