EssexUniversityMCTS / gvgai

This is the framework for the General Video Game Competition - http://www.gvgai.net/
Other
140 stars 69 forks source link

Suggestions thread #12

Closed mrakgr closed 8 years ago

mrakgr commented 8 years ago
def turnAround(sprite, partner, game):
    sprite.rect = sprite.lastrect
    sprite.lastmove = sprite.cooldown
    sprite.physics.activeMovement(sprite, DOWN)
    sprite.lastmove = sprite.cooldown
    sprite.physics.activeMovement(sprite, DOWN)
    reverseDirection(sprite, partner, game)
    game._updateCollisionDict(sprite)

The above is from pyVGDL (which I find much more readable than the Java Gvgai.) I suggest that turnAround be split into two interactions, on for turning around and one for going down in the next iteration of the library.

Suggestion 2:

diamond avatar > collectResource

Contrary to all the other examples, collectResource acts upon the right side. For consistency, I suggest this be changed to work like all the other effects.

A practical reason for the above would be for concurrency. Effects being operated out of order could lead to data races.

Suggestion 3:

In the Digdug game I noticed that in the TansformTo interaction effect, the orientation rule seems to be to transfer the orientation from the actee to the actor if its default orientation is zero. It might be better to have a separate interaction for that, something like TransformToMomentum.

Suggestion 4:

avatar fire > changeResource resource=water value=-1 scoreChange=-1
avatar fire  > killIfHasLess resource=water limit=0

In the Firestorms game the order of the two effects above should be reversed so the avatar does not die while having water.

Suggestion 5:

In the transformToAll effect, make it so it takes in stype1 and stype2 instead of stype and stype2. This seems like a quible, but in the AltChaser class having stype1 implies that there is a stype2. Not so in transformToAll.

Suggestion 6:

In SeaQuest game description there is a w > water mapping that does nothing.

Similarly, in Aliens level 0 and Pacman level 0 there are some undefined characters. Also, in SeaQuest the '.' character is undefined.

Suggestion 7:

In BoloAdventures the following three effects can be replaced more succinctly

boulderm hole > spawnIfHasMore resource=null limit=0 stype=boulderinhole
boulderm hole > killSprite
hole boulderinhole > killSprite  scoreChange=1

The above 3 effects can easily be replaced by:

hole boulderm > transformTo stype=boulderinhole scoreChange=1
boulderm hole > killSprite

Suggestion 8:

In ChipsChallenge gliding > InertialAvatar img=ghost does absolutely nothing.

Suggestion 9:

#Modality: #http://www.puzzlescript.net/play.html?p=6888061

BasicGame
    SpriteSet
        black > Immovable color=BLACK
        white > Immovable color=WHITE
        grey > Immovable
        target > Passive img=portal shrinkfactor=0.9
        winTarget > Immovable img=portal shrinkfactor=0.9
        crate > Passive img=box shrinkfactor=0.8
        avatar > MovingAvatar
            inBlack > img=avatar
            inWhite > img=alien
            inGrey > img=ghost

    LevelMapping
        . > black
        + > white
        g > grey
        B > inGrey black
        A > inGrey white
        * > crate black
        @ > crate white
        t > target black
        U > target white

    TerminationSet
        SpriteCounter      stype=target               limit=0 win=True

    InteractionSet
        avatar EOS > stepBack
        inBlack white > stepBack
        inWhite black > stepBack
        inGrey black > transformTo stype=inBlack
        inGrey white > transformTo stype=inWhite
        avatar grey > transformTo stype=inGrey
        crate avatar > bounceForward
        crate wall > undoAll
        target wall > undoAll
        avatar wall > stepBack
        target crate > transformTo stype=winTarget scoreChange=1

Replace the current Modality game description with the amended equivalent one above. As it currently stands, Modality transforms the avatar at every step. I am not sure how it is with the GVGAI library, but in my own this triggers a sort of the sprite array on every step. Thankfully this particular game is not very demanding, but as inGrey exists why not make use of it?

Random thought 10: ...Is the level 3 of modality really beatable?

diegopliebana commented 8 years ago

Many thanks for all these suggestions!

1: I really see no problems with this. In two interactions, we'd need to find what is the alien interacting with to actually make it move. Both movements are the reaction of a single interaction.

2: This effect affects both sprites (I mentioned this here: https://github.com/EssexUniversityMCTS/gvgai/issues/19)

3: We have one: it's called AttractGaze. In digdug, we want to transform it all.

4: This has changed in vgdl 2.0: now the avatar has health points instead of a resource that fakes the same thing.

5: Got your point, but that'd mean having stype1 in TransformTo (TransformToAll inherits from TransformTo), and I rather have only stype there. Instead, I've changed stype2 in TransformToAll to stypeTo.

6: Seaquest: 'a w > water' is gone. Removed w as water is unused. '.' is correctly undefined (we need a character to represent empty space not surrounded by walls, and '.' is more visual than ' '. aliens and pacman: I see all ok.

7: The definition of this game has changed considerably for vgdl 2.0, those lines aren't there anymore.

8: gliding (and normal) are out.

9: good point. done!

10: Yes! :) (Hint: note that the avatar can go through the exit door)