Skip to content

Commit

Permalink
square 200
Browse files Browse the repository at this point in the history
  • Loading branch information
kngwyu committed Mar 28, 2024
1 parent 25575ed commit b3ab6b0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 5 deletions.
4 changes: 2 additions & 2 deletions config/env/20240325-moving.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ max_force = 80.0
min_force = -20.0
init_energy = 40.0
energy_capacity = 400.0
force_energy_consumption = 2e-5
basic_energy_consumption = 2e-4
force_energy_consumption = 4e-5
basic_energy_consumption = 1e-3
energy_share_ratio = 0.4
n_velocity_iter = 6
n_position_iter = 2
Expand Down
30 changes: 30 additions & 0 deletions config/env/20240328-square-200.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
n_initial_agents = 50
n_max_agents = 200
n_max_foods = 50
food_num_fn = ["logistic", 20, 0.01, 50]
food_loc_fn = "gaussian"
agent_loc_fn = "uniform"
xlim = [0.0, 480.0]
ylim = [0.0, 360.0]
env_shape = "square"
neighbor_stddev = 100.0
n_agent_sensors = 24
sensor_length = 200.0
sensor_range = "wide"
agent_radius = 10.0
food_radius = 4.0
foodloc_interval = 1000
dt = 0.1
linear_damping = 0.8
angular_damping = 0.6
max_force = 80.0
min_force = -20.0
init_energy = 40.0
energy_capacity = 400.0
force_energy_consumption = 2e-5
basic_energy_consumption = 1e-3
energy_share_ratio = 0.4
n_velocity_iter = 6
n_position_iter = 2
n_physics_iter = 5
max_place_attempts = 10
4 changes: 1 addition & 3 deletions experiments/cf_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ def replace_net(
@app.command()
def evolve(
seed: int = 1,
action_cost: float = 1e-4,
mutation_prob: float = 0.2,
action_cost: float = 4e-5,
adam_lr: float = 3e-4,
adam_eps: float = 1e-7,
gamma: float = 0.999,
Expand Down Expand Up @@ -408,7 +407,6 @@ def evolve(
mutation = gopsconfig.load_model()
# Override config
cfconfig.force_energy_consumption = action_cost
gopsconfig.params["mutation_prob"] = mutation_prob
# Make env
env = make("CircleForaging-v0", **dataclasses.asdict(cfconfig))
key, reward_key = jax.random.split(jax.random.PRNGKey(seed))
Expand Down

0 comments on commit b3ab6b0

Please sign in to comment.