Code Monkey home page Code Monkey logo

vgdl-pddl's People

Contributors

ignaciovellido avatar vol0kin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vgdl-pddl's Issues

Add information about orientable objects in the configuration file.

There should be a way to easily tell which objects are orientable and which aren't. To do so, the orientation field of the configuration file can be modified so it contains a list of the orientable objects and their default orientation, if any. The following example could be an expected output of this field for the Boulderdash game:

orientation:
  boulder: DOWN
  avatar: NONE

The orientation of objects whose default orientation is NONE has to be deduced while parsing the game state.

Missing closing parenthesis in SWORD_DISAPPEAR's effects.

The negative effect of the SWORD_DISAPPEAR action lacks its closing parenthesis:

(:action SWORD_DISAPPEAR
		:parameters (?x - sword ?c - cell)
		:precondition (and
						(turn-sword-disappear)
						(at ?c ?x)
					)
		:effect (and
					(not (at ?c ?x)  <--- missing parenthesis here
					(object-dead ?x)
					(sword-disappeared ?x)
				)
	)

Improve readability of configuration file.

As of now, the fields in the configuration file are mixed-up. Its inner structure should be modified so it becomes more easily readable. See this example of how fields are organized. Obviously, newly added fields should be inserted in reasonable positions.

Some objects in the domain are not included in the configuration

In catapults:

floor > Immovable
water > Immovable
catapult > Immovable
    southfacing > orientation=DOWN
    northfacing > orientation=UP
    eastfacing  > orientation=RIGHT
    westfacing  > orientation=LEFT
avatar >
    moving > MovingAvatar
    bullet > MissileAvatar
        north  > orientation=UP
        south  > orientation=DOWN
        east   > orientation=RIGHT
        west   > orientation=LEFT
goal  > Immovable
wall > Immovable

Only one object is included in the variableTypes section

variableTypes:
  ?floor: floor

Configuration file includes incorrect correspondences between game elements and PDDL predicates.

When the configuration file is generated, some of the correspondences between game elements and PDDL predicates are not generated correctly. For example, the configuration file of the Boulderdash game contains the following correspondences:

gameElementsCorrespondence:
  avatar:
  - (at ?c ?avatar)
  - (last-at ?c ?avatar)
  - (can-move-up ?avatar)
  - (can-move-down ?avatar)
  - (can-move-left ?avatar)
  - (can-move-right ?avatar)
  - (can-use ?avatar)
  background:
  - (at ?c ?background)
  - (last-at ?c ?background)
  boulder:
  - (at ?c ?boulder)
  - (last-at ?c ?boulder)
  - (boulder-moved ?x - Missile)
  butterfly:
  - (at ?c ?butterfly)
  - (last-at ?c ?butterfly)
  crab:
  - (at ?c ?crab)
  - (last-at ?c ?crab)
  diamond:
  - (at ?c ?diamond)
  - (last-at ?c ?diamond)
  - (got-resource-diamond ?x - diamond)
  dirt:
  - (at ?c ?dirt)
  - (last-at ?c ?dirt)
  exitdoor:
  - (at ?c ?exitdoor)
  - (last-at ?c ?exitdoor)
  sword:
  - (at ?c ?sword)
  - (last-at ?c ?sword)
  - (sword-disappeared ?x - Flicker)
  wall:
  - (at ?c ?wall)
  - (last-at ?c ?wall)

The following correspondences are not generated properly since they don't contain any of the previously defined variables and specify the type of the variable inside the template predicate itself:

gameElementsCorrespondence:
  boulder:
  - (boulder-moved ?x - Missile)
  diamond:
  - (got-resource-diamond ?x - diamond)
  sword:
  - (sword-disappeared ?x - Flicker)

An example of a correct output might be this one:

gameElementsCorrespondence:
  boulder:
  - (boulder-moved ?boulder)
  diamond:
  - (got-resource-diamond ?diamond)
  sword:
  - (sword-disappeared ?sword)

Automatize generation of goal predicates.

This is more of a suggestion rather than an issue. Maybe if we are able to use the VGDL description we could automatically generate goal predicates. This way, the generation of the configuration file can be fully automated and it wouldn't require any kind of user modification.

Orientations are not consistent in the domains

Some avatars are incorrectly represented with orientations when it shouldn't.
At the same time, ACTION_MOVE... like actions include orientation preconditions even though other avatars don't have those kind of predicates.

Also, (can- ...) predicates have no use in PDDL (they derive from the HPDL counterpart, where a strategy was needed).

Change naming convention of cells in the connections field.

The connections between cells is specified using the connections field, which has the following structure:

connections:
  DOWN: (connected-down ?c1 ?c2)
  LEFT: (connected-left ?c1 ?c2)
  RIGHT: (connected-right ?c1 ?c2)
  UP: (connected-up ?c1 ?c2)

Instead of using ?c1 and ?c2 to name the cells, it would be a better approach to use the following naming convention:

  • ?c for the central cell.
  • ?u for the upper cell.
  • ?d for the down cell.
  • ?l for the left cell.
  • ?r for the right cell.

This is the naming that the agent uses to generate the cell connection predicates. Below you can see an example which illustrates the correspondence between the names specified above and their positions regarding each other.

       --------
       |  ?u  |
----------------------
|  ?l  |  ?c  |  ?r  |
----------------------
       |  ?d  |
       --------

Error when variable names contains numbers

When a variable defined in the configuration file (or generally, in the game) contains a number the following error is returned:

Exception in thread "main" java.lang.NullPointerException 
at controller.PlanningAgent.translateGameStateToPDDL(PlanningAgent.java:634)
at controller.PlanningAgent.act(PlanningAgent.java:207
at ontology.avatar.MovingAvatar.requestPlayerInput(MovingAvatar.java:135)
at ontology.avatar.MovingAvatar.updateAvatar(MovingAvatar.java:103)
at ontology.avatar.oriented.OrientedAvatar.updateAvatar(OrientedAvatar.java:53)
at core.game.Game.tick(Game.java:1363)
at core.game.Game.gameCycle(Game.java:1101)
at core.game.Game.runGame(Game.java:873)
at tracks.ArcadeMachine.runOneGame(ArcadeMachine.java:168)
at tracks.singlePlayer.Test.main(Test.java:83)             

For example, when giving the configuration file:

gameElementsCorrespondences:
...
  inc1:
  - (at ?x ?y ?inc1)
  inc2:
  - (at ?x ?y ?inc2)
  inc3:
  - (at ?x ?y ?inc3)
  inc4:
  - (at ?x ?y ?inc4)
  inc5:
  - (at ?x ?y ?inc5)
  inc6:
  - (at ?x ?y ?inc6)

variablesTypes:
  ?inc1: inc1
  ?inc2: inc2
  ?inc3: inc3
  ?inc4: inc4
  ?inc5: inc5
  ?inc6: inc6

Renaming the variables (in the VGDL file and in the config) misses the error:

gameElementsCorrespondences:
...
  inca:
  - (at ?x ?y ?inca)
  incb:
  - (at ?x ?y ?incb)
  incc:
  - (at ?x ?y ?incc)
  incd:
  - (at ?x ?y ?incd)
  ince:
  - (at ?x ?y ?ince)
  incf:
  - (at ?x ?y ?incf)

variablesTypes:
  ?inca: inca
  ?incb: incb
  ?incc: incc
  ?incd: incd
  ?ince: ince
  ?incf: incf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.