-
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.
Add a third version ok Sokoban, same than the second but different re…
…ward system
- Loading branch information
HervierLucas
committed
Oct 7, 2020
1 parent
a66d72a
commit e8f5198
Showing
2 changed files
with
193 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,190 @@ | ||
Version: "0.1" | ||
Environment: | ||
Name: Sokoban - 3 | ||
Description: Push the boxes onto the marked spaces | ||
Observers: | ||
Sprite2D: | ||
TileSize: 24 | ||
BackgroundTile: gvgai/newset/floor2.png | ||
Player: | ||
AvatarObject: avatar # The player can only control a single avatar in the game | ||
Termination: | ||
Win: | ||
- eq: [box:count, 0] # If there are no boxes left | ||
Levels: | ||
- | | ||
wwwwwwww | ||
ww.....w | ||
ww.hbh.w | ||
ww.bAb.w | ||
w..hbh.w | ||
w......w | ||
wwwwwwww | ||
- | | ||
wwwwwwwwwwww | ||
w....www...w | ||
w.bb.....wAw | ||
w.b.whhh...w | ||
w...wwwwwwww | ||
wwwwwwwwwwww | ||
- | | ||
wwwwwww | ||
w.....w | ||
w.hbh.w | ||
w.bhb.w | ||
w.hbh.w | ||
w.bhb.w | ||
w..A..w | ||
wwwwwww | ||
- | | ||
wwwwww | ||
wh..ww | ||
wAbb.w | ||
ww...w | ||
www..w | ||
wwwwhw | ||
wwwwww | ||
- | | ||
wwwwwwww | ||
www.hhAw | ||
www.bb.w | ||
wwww.www | ||
wwww.www | ||
wwww.www | ||
wwww.www | ||
w....www | ||
w.w...ww | ||
w...w.ww | ||
www...ww | ||
wwwwwwww | ||
Actions: | ||
# Define the move action | ||
- Name: move | ||
Behaviours: | ||
# The agent can move around freely in empty space and over holes | ||
- Src: | ||
Object: avatar | ||
Commands: | ||
- mov: _dest | ||
Dst: | ||
Object: [_empty, hole] | ||
|
||
# Boxes can move into empty space | ||
- Src: | ||
Object: box | ||
Commands: | ||
- mov: _dest | ||
Dst: | ||
Object: _empty | ||
|
||
# The agent can push boxes | ||
- Src: | ||
Object: avatar | ||
Commands: | ||
- mov: _dest | ||
Dst: | ||
Object: [box, box_in_place] | ||
Commands: | ||
- exec: | ||
Action: move | ||
|
||
# If a box is moved into a hole, it should change to in-place box | ||
- Src: | ||
Object: box | ||
Commands: | ||
- mov: _dest | ||
- change_to: box_in_place | ||
- reward: 1 | ||
Dst: | ||
Object: hole | ||
|
||
- Src: | ||
Object: box_in_place | ||
Commands: | ||
- mov: _dest | ||
- change_to: box_in_place | ||
Dst: | ||
Object: hole | ||
|
||
# If in-place box is moved into empty space, it should be an empty box | ||
- Src: | ||
Object: box_in_place | ||
Commands: | ||
- mov: _dest | ||
- change_to: box | ||
- reward: -1 | ||
Dst: | ||
Object: _empty | ||
|
||
Objects: | ||
- Name: box | ||
Z: 2 | ||
MapCharacter: b | ||
Observers: | ||
Sprite2D: | ||
- Image: gvgai/newset/block2.png | ||
Block2D: | ||
- Shape: square | ||
Color: [1.0, 0.0, 0.0] | ||
Scale: 0.5 | ||
|
||
- Name: box_in_place | ||
Z: 2 | ||
MapCharacter: f | ||
Observers: | ||
Sprite2D: | ||
- Image: gvgai/newset/block1.png | ||
Block2D: | ||
- Shape: square | ||
Color: [0.0, 1.0, 0.0] | ||
Scale: 0.5 | ||
|
||
- Name: wall | ||
MapCharacter: w | ||
Observers: | ||
Sprite2D: | ||
- TilingMode: WALL_16 | ||
Image: | ||
- gvgai/oryx/wall3_0.png | ||
- gvgai/oryx/wall3_1.png | ||
- gvgai/oryx/wall3_2.png | ||
- gvgai/oryx/wall3_3.png | ||
- gvgai/oryx/wall3_4.png | ||
- gvgai/oryx/wall3_5.png | ||
- gvgai/oryx/wall3_6.png | ||
- gvgai/oryx/wall3_7.png | ||
- gvgai/oryx/wall3_8.png | ||
- gvgai/oryx/wall3_9.png | ||
- gvgai/oryx/wall3_10.png | ||
- gvgai/oryx/wall3_11.png | ||
- gvgai/oryx/wall3_12.png | ||
- gvgai/oryx/wall3_13.png | ||
- gvgai/oryx/wall3_14.png | ||
- gvgai/oryx/wall3_15.png | ||
Block2D: | ||
- Shape: triangle | ||
Color: [0.6, 0.6, 0.6] | ||
Scale: 0.9 | ||
|
||
- Name: hole | ||
Z: 1 | ||
MapCharacter: h | ||
Observers: | ||
Sprite2D: | ||
- Image: gvgai/oryx/cspell4.png | ||
Block2D: | ||
- Shape: triangle | ||
Color: [0.0, 1.0, 0.0] | ||
Scale: 0.6 | ||
|
||
- Name: avatar | ||
Z: 2 | ||
MapCharacter: A | ||
Observers: | ||
Sprite2D: | ||
- Image: gvgai/oryx/knight1.png | ||
Block2D: | ||
- Shape: triangle | ||
Color: [0.2, 0.2, 0.6] | ||
Scale: 1.0 |