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

Experimenter defines spawning rules: 8pts #240

Open
1 task done
skleinfeldt opened this issue May 1, 2023 · 2 comments
Open
1 task done

Experimenter defines spawning rules: 8pts #240

skleinfeldt opened this issue May 1, 2023 · 2 comments
Assignees

Comments

@skleinfeldt
Copy link

skleinfeldt commented May 1, 2023

User story:

As an experimenter I can define overall spawning rules for the map: whether objects are randomly placed or clumped.

[Note: this may have elements in common with the wall-building algorithms. Natalia will take the lead on algorithm development.]

  • Apply configurable spawning algorithms to item types
@jessesnyder jessesnyder changed the title Experimenter defines spawning rules Experimenter defines spawning rules: 8pts May 3, 2023
@alecpm
Copy link
Contributor

alecpm commented Jul 19, 2023

On further investigation GU already handles this pretty well, and we're going to be generalizing the existing spawning rules as part of the definition of objects in #232 in order to replicate the current functionality for "Food" objects. The following optional properties will be available on all objects:

  • initial_count: how many to put on the map initially (formerly num_food)
  • respawn: Should a consumed object be immediately replaced in another location (formerly respawn_food)
  • public_good_multiplier: Should the calories of this object be split among all players when consumed (formerly food_pg_multiplier)
  • growth_rate: The rate at which the number of objects increases (formerly food_growth_rate)
  • seasonal_growth_rate: A rate multiplier that changes per game round. In odd rounds the growth_rate is multiplied by this value, and in even rounds it's divided by this value.
  • probability_distribution: A named probability distribution used for placing objects, see distributions.py (formerly food_probability_distribution defaults to random).

Somewhat related are:

  • maturation_speed: The rate at which objects "mature" and eventually "spoil" or disappear (formerly food_maturation_speed).
  • maturation_threshold: The maturity level at which an object is removed from the map (formerly food_maturation_threshold)

@alecpm
Copy link
Contributor

alecpm commented Jul 31, 2023

This was 95% done when implementing #232, but I did a small refactor to support configuring the initial player distribution. I've included that change into PR #248. Both aspects seem to be working well.

@jessesnyder jessesnyder self-assigned this Aug 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants