Skip to content

Commit 63c06d4

Browse files
committed
update notes
1 parent b98b1b0 commit 63c06d4

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fi
88
mkdir -p build
99
cd build
1010
cmake ..
11-
#make -j $(nproc)
11+
1212
if [[ "$OSTYPE" == "linux-gnu" ]]; then
1313
# Linux
1414
make -j `nproc`

examples/train_against.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def play_a_round(env, map_size, handles, models, print_every, eps, step_batch_si
228228
tic = time.time()
229229
start = 1 if args.opponent != -1 else 0.1
230230
train_eps = magent.utility.piecewise_decay(k, [0, 100, 250], [start, 0.1, 0.05]) if not args.greedy else 0
231-
opponent_eps = train_eps if k < 0 else 0.05 # can use curriculum learning in first 100 steps
231+
opponent_eps = train_eps if k < 100 else 0.05 # can use curriculum learning in first 100 steps
232232

233233
loss, num, reward, value = play_a_round(env, args.map_size, handles, models,
234234
eps=[opponent_eps, train_eps], step_batch_size=step_batch_size,

python/magent/gridworld.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,24 @@ def register_agent_type(self, name, attr):
703703
name of the type (should be unique)
704704
attr: dict
705705
key value pair of the agent type
706+
see notes below to know the available attributes
707+
708+
Notes
709+
-----
710+
height: int, height of agent body
711+
width: int, width of agent body
712+
speed: float, maximum speed, i.e. the radius of move circle of the agent
713+
hp: float, maximum health point of the agent
714+
view_range: gw.CircleRange or gw.SectorRange
715+
716+
damage: float, attack damage
717+
step_recover: float, step recover of health point (can be negative)
718+
kill_supply: float, the hp gain when kill this type of agents
719+
720+
step_reward: float, reward get in every step
721+
kill_reward: float, reward gain when kill this type of agent
722+
dead_penalty: float, reward get when dead
723+
attack_penalty: float, reward get when perform an attack (this is used to make agents do not attack blank grid)
706724
"""
707725
if name in self.agent_type_dict:
708726
raise Exception("type name %s already exists" % name)

0 commit comments

Comments
 (0)