EssexUniversityMCTS/gvgai

The global UndoAll effect should be replaced by a local effect

Closed this issue · 1 comments

wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
w   D   C         D    D D    w
w C       C        C          w
w              C     C        w
wBAC                         Gw
w        C      C    B        w
w C D                         w
w       C         CC      C   w
w    C       U      U         w
wwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

In the above BoloAdventure example level by rolling the boulder to the right and then by pushing the box into the wall to left, it is possible to freeze the entire level as long as the left key is pressed. I am guessing a global effect such as this got introduced due to ease of implementation in the pyVGDL library, but in my own library I implemented it by introducing another collision detection phase and making it a local effect like StepBack.

As my own effect is local, I wanted to say that the BoloAdventure game description is lacking a
box boulder > undoAll inside the InteractionSet for without it the boxes phase into the boulders, but now I see that UndoAll works differently on GVGAI.

It might be worth considering introducing a local effect to provide the function UndoAll is intended to provide here for the sake of efficiency and simplicity.

Edit: Or maybe not. I am really regretting that I have three phases right now as they prevent me from implementing some games. It is beyond me how to prevent objects from sinking into one another without extra steps.

The problem with multiple passes for collision detection is efficiency. Although it might be basically unnoticeable when playing the game as a human, we need to keep the collision handling as fast as possible to provide a fast forward model for the simulations that the bot perform during their decision time.

UndoAll has a new parameter "notStype" (which allows one ore more values) in vgdl 2.0 that avoids that some specific types are affected by this effect. This avoids the freezing of the whole level.