-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Matthijs den Toom
authored and
Matthijs den Toom
committed
Feb 5, 2019
1 parent
8197874
commit baed643
Showing
6 changed files
with
26 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
# This file generates and stores a grid generated. | ||
import numpy as np | ||
from gym_multi_robot.envs.foraging_game import ForagingGame | ||
|
||
from gym_multi_robot.envs.tiling_pattern_game import TilingPatternGame | ||
|
||
if __name__ == '__main__': | ||
|
||
x_dim = 11 | ||
y_dim = 11 | ||
output_file = 'tiles11x11.npy' | ||
output_file = 'foraging50x50.pickle' | ||
|
||
game = TilingPatternGame((11, 11), 2) | ||
game = ForagingGame((50, 50), 1000, (0, 0, 2, 2)) | ||
game.reset() | ||
|
||
print('Initial fitness:' + str(game.get_fitness())) | ||
print(game.num_tiles) | ||
print(game.grid) | ||
np.save(output_file, game.grid) | ||
print(game.target_area) | ||
|
||
game.write(output_file) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from gym_multi_robot.envs.tiling_pattern_env import TilingPatternEnv | ||
from gym_multi_robot.envs.foraging_env import ForagingEnv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters