You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
all print statements should be printed to stderr, NOT stdout (printing to stdout will break the program) i.e. print(stuff, file=sys.stderr
in addition to the expected results, please check ALL other items in obs['player_0'] (or whatever player number) to make sure everything makes sense (e.g. obs['player_0']['resetting'] is not True while the players should be alive). if smth seems off, pls flag it
if the respawning bombs and boosts are annoying, at line 208 change self.place_boost_bomb(rate = 0.1) to self.place_boost_bomb(rate = 0). make sure you don't commit this change
once done, @ me in the comments and explain what you found
Tests
Please check this scenario with multiple different enclosings, not just one. Different shapes, sizes, etc.
Scenario 1
You only need 1 bot for this one
player_0 moves around the map (without dying) and returns to their zone, enclosing an area
Please test with bombs and boosts - you can turn off bomb/boost respawning if you want, but at least keep the initial bombs and boosts. This is because, if an enclosed territory includes bombs or boosts, that will still be considered a part of that territory
all of the area that player_0 encloses (including this own line) should become a part of the zone
no area outside of this should be enclosed
If there is a bomb or boost, it's still there on the board, but it's added to player_0's territory in obs['board']['players_state']
Programmatic check for values
set board = obs['board']['board_state']
set player_owned = obs['board']['players_state']
set player_num = obs[self.player]['player_num'])
set PASSED = 1
set occupied_territory = np.where(np.logical_and(board != PASSED, player_owned == player_num))
find num_squares = len(occupied_territory[0])
num_squares should be the correct number of tiles occupied
Scenario 1
You need 2 bots for this one
player_0 has some territory. player_1 intersects that territory and encircles it such that some of player_0's territory is inside the encircled area
player_0's territory inside the encircled area should be overwritten as player_1's territory
Please test with bombs and boosts - you can turn off bomb/boost respawning if you want, but at least keep the initial bombs and boosts. This is because, if an enclosed territory includes bombs or boosts, that will still be considered a part of that territory
print(stuff, file=sys.stderrobs['player_0'](or whatever player number) to make sure everything makes sense (e.g.obs['player_0']['resetting']is notTruewhile the players should be alive). if smth seems off, pls flag itself.place_boost_bomb(rate = 0.1)toself.place_boost_bomb(rate = 0). make sure you don't commit this changeTests
Scenario 1
Expected Results
-o test, which outputs to test.json. upload test.json to the replay script: https://colab.research.google.com/drive/1ncSEI2xelHIanrWlnqZVIWYn51UTqq7g?authuser=1#scrollTo=zUWD3nDJ4kOi)obs['board']['players_state']board = obs['board']['board_state']player_owned = obs['board']['players_state']player_num = obs[self.player]['player_num'])PASSED = 1occupied_territory = np.where(np.logical_and(board != PASSED, player_owned == player_num))num_squares = len(occupied_territory[0])num_squaresshould be the correct number of tiles occupiedScenario 1
Expected Results
-o test, which outputs to test.json. upload test.json to the replay script: https://colab.research.google.com/drive/1ncSEI2xelHIanrWlnqZVIWYn51UTqq7g?authuser=1#scrollTo=zUWD3nDJ4kOi)board = obs['board']['board_state']player_owned = obs['board']['players_state']player_num = obs[self.player]['player_num'])PASSED = 1occupied_territory = np.where(np.logical_and(board != PASSED, player_owned == player_num))num_squares = len(occupied_territory[0])num_squaresshould be reduced for player_0 and increased for player_1 by the correct amounts