diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 67a9183de..6180919f5 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -24,7 +24,7 @@ If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - OS: [e.g. mac/linux/windows] - - Version [e.g. 1.0.2] + - Version [e.g. 1.1.0] **Additional context** Add any other context about the problem here. diff --git a/CMakeLists.txt b/CMakeLists.txt index fe71fc69f..fce710fb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10.0) -project(Griddly VERSION 1.0.2) +project(Griddly VERSION 1.1.0) set(BINARY ${CMAKE_PROJECT_NAME}) diff --git a/bindings/python.cpp b/bindings/python.cpp index 096ab806a..5f49ab57c 100644 --- a/bindings/python.cpp +++ b/bindings/python.cpp @@ -12,7 +12,7 @@ namespace griddly { PYBIND11_MODULE(python_griddly, m) { m.doc() = "Griddly python bindings"; - m.attr("version") = "1.0.2"; + m.attr("version") = "1.1.0"; #ifndef NDEBUG spdlog::set_level(spdlog::level::debug); diff --git a/docs/conf.py b/docs/conf.py index 791cda6d3..9def514bc 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ author = 'Chris Bamford' # The full version, including alpha/beta/rc tags -release = '1.0.2' +release = '1.1.0' # -- General configuration --------------------------------------------------- diff --git a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/gt/index.rst b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/gt/index.rst index b17171929..12afd72ba 100644 --- a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/gt/index.rst +++ b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/gt/index.rst @@ -1,6 +1,6 @@ -.. _#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/lt: +.. _#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/gt: -.. #/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/lt +.. #/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/gt Greater Than ============ diff --git a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/gte/index.rst b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/gte/index.rst new file mode 100644 index 000000000..e33e2f05c --- /dev/null +++ b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/gte/index.rst @@ -0,0 +1,34 @@ +.. _#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/gte: + +.. #/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/gte + +Greater Than Or Equal +===================== + +:Description: The specified commands will only be run if the value of the first argument is greater than or equal to the second. + +.. list-table:: + + * - **Data Type** + - **YAML Key** + * - object + - ``gte`` + + +:Properties: + +.. list-table:: + + * - **Property** + - **Required** + * - :ref:`Arguments <#/properties/Actions/items/properties/Behaviours/definitions/commandArgument>` + - + * - :ref:`Commands <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommandList>` + - + + +.. toctree:: + :hidden: + + /reference/GDY/Actions/items/Behaviours/commandArgument/index + /reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommandList/index diff --git a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/index.rst b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/index.rst index 67acf5c70..89c897441 100644 --- a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/index.rst +++ b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/index.rst @@ -15,9 +15,13 @@ Conditional Behaviour Command - **Required** * - :ref:`eq <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/eq>` - - * - :ref:`lt <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/gt>` + * - :ref:`lt <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/lt>` - - * - :ref:`gt <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/lt>` + * - :ref:`lte <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/lte>` + - + * - :ref:`gt <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/gt>` + - + * - :ref:`gte <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/gte>` - @@ -26,4 +30,6 @@ Conditional Behaviour Command eq/index lt/index + lte/index gt/index + gte/index diff --git a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/lt/index.rst b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/lt/index.rst index b3559569f..21f59e255 100644 --- a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/lt/index.rst +++ b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/lt/index.rst @@ -1,6 +1,6 @@ -.. _#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/gt: +.. _#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/lt: -.. #/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/gt +.. #/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/lt Less Than ========= diff --git a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/lte/index.rst b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/lte/index.rst new file mode 100644 index 000000000..e3acf8980 --- /dev/null +++ b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommand/lte/index.rst @@ -0,0 +1,34 @@ +.. _#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/lte: + +.. #/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommand/properties/lte + +Less Than Or Equal +================== + +:Description: The specified commands will only be run if the value of the first argument is less than or equal to the second. + +.. list-table:: + + * - **Data Type** + - **YAML Key** + * - object + - ``lte`` + + +:Properties: + +.. list-table:: + + * - **Property** + - **Required** + * - :ref:`Arguments <#/properties/Actions/items/properties/Behaviours/definitions/commandArgumentList>` + - + * - :ref:`Commands <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionConditionalCommandList>` + - + + +.. toctree:: + :hidden: + + /reference/GDY/Actions/items/Behaviours/commandArgumentList/index + /reference/GDY/Actions/items/Behaviours/behaviourDefinitionConditionalCommandList/index diff --git a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionPreconditionCommand/gte/index.rst b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionPreconditionCommand/gte/index.rst new file mode 100644 index 000000000..fd95c5aff --- /dev/null +++ b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionPreconditionCommand/gte/index.rst @@ -0,0 +1,36 @@ +.. _#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionPreconditionCommand/properties/gte: + +.. #/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionPreconditionCommand/properties/gte + +Greater Than Or Equal +===================== + +:Description: Check if the first argument is greater than or equal to the second + +.. list-table:: + + * - **Data Type** + - **YAML Key** + - **Max Items** + - **Min Items** + * - array + - ``gte`` + - 2 + - 2 + + +:Array Type: + +.. list-table:: + + * - **Type** + - **Description** + * - :ref:`Command Argument<#/properties/Actions/items/properties/Behaviours/definitions/commandArgument>` + - An argument to a behaviour command. + + +.. toctree:: + :maxdepth: 5 + :hidden: + + /reference/GDY/Actions/items/Behaviours/commandArgument/index diff --git a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionPreconditionCommand/index.rst b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionPreconditionCommand/index.rst index 2045263e1..ebeb2be84 100644 --- a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionPreconditionCommand/index.rst +++ b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionPreconditionCommand/index.rst @@ -19,8 +19,12 @@ Behaviour Precondition - * - :ref:`gt <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionPreconditionCommand/properties/gt>` - + * - :ref:`gte <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionPreconditionCommand/properties/gte>` + - * - :ref:`lt <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionPreconditionCommand/properties/lt>` - + * - :ref:`lte <#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionPreconditionCommand/properties/lte>` + - .. toctree:: @@ -29,4 +33,6 @@ Behaviour Precondition eq/index neq/index gt/index + gte/index lt/index + lte/index diff --git a/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionPreconditionCommand/lte/index.rst b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionPreconditionCommand/lte/index.rst new file mode 100644 index 000000000..f46235818 --- /dev/null +++ b/docs/reference/GDY/Actions/items/Behaviours/behaviourDefinitionPreconditionCommand/lte/index.rst @@ -0,0 +1,36 @@ +.. _#/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionPreconditionCommand/properties/lte: + +.. #/properties/Actions/items/properties/Behaviours/definitions/behaviourDefinitionPreconditionCommand/properties/lte + +Less Than Or Equal +================== + +:Description: Check if the first argument is less than or equal to the second + +.. list-table:: + + * - **Data Type** + - **YAML Key** + - **Max Items** + - **Min Items** + * - array + - ``lte`` + - 2 + - 2 + + +:Array Type: + +.. list-table:: + + * - **Type** + - **Description** + * - :ref:`Command Argument<#/properties/Actions/items/properties/Behaviours/definitions/commandArgument>` + - An argument to a behaviour command. + + +.. toctree:: + :maxdepth: 5 + :hidden: + + /reference/GDY/Actions/items/Behaviours/commandArgument/index diff --git a/docs/reference/GDY/Environment/Termination/End/index.rst b/docs/reference/GDY/Environment/Termination/End/index.rst index 5c1674eee..fefb3c696 100644 --- a/docs/reference/GDY/Environment/Termination/End/index.rst +++ b/docs/reference/GDY/Environment/Termination/End/index.rst @@ -7,26 +7,24 @@ End Conditions :Description: If any of these conditions are met, the game will end. -.. list-table:: +:Possible Values: - * - **Data Type** - - **YAML Key** - * - array - - ``End`` +.. list-table:: + * - **Value** + - **Type** + - **Description** + * - V1 Termination Conditions + - array + - V1 Termination Conditions + * - V2 Termination Conditions + - array + - V2 Termination Conditions -:Array Type: .. list-table:: - * - **Type** - - **Description** - * - :ref:`Termination Conditions<#/properties/Environment/properties/Termination/definitions/terminationCondition>` - - When a termination condition is met, the game will reset itself. If there are multiple players, the termination arguments are expanded internally "per player". This can be used to find the first player to a certain number of objects, or the first player to reach a certain score - + * - **YAML Key** + * - ``End`` -.. toctree:: - :maxdepth: 5 - :hidden: - /reference/GDY/Environment/Termination/terminationCondition/index diff --git a/docs/reference/GDY/Environment/Termination/Lose/index.rst b/docs/reference/GDY/Environment/Termination/Lose/index.rst index e574d049e..1865e854e 100644 --- a/docs/reference/GDY/Environment/Termination/Lose/index.rst +++ b/docs/reference/GDY/Environment/Termination/Lose/index.rst @@ -7,26 +7,24 @@ Lose Conditions :Description: If any of these conditions are met, the player associated with this condition will lose the game. -.. list-table:: +:Possible Values: - * - **Data Type** - - **YAML Key** - * - array - - ``Lose`` +.. list-table:: + * - **Value** + - **Type** + - **Description** + * - V1 Termination Conditions + - array + - V1 Termination Conditions + * - V2 Termination Conditions + - array + - V2 Termination Conditions -:Array Type: .. list-table:: - * - **Type** - - **Description** - * - :ref:`Termination Conditions<#/properties/Environment/properties/Termination/definitions/terminationCondition>` - - When a termination condition is met, the game will reset itself. If there are multiple players, the termination arguments are expanded internally "per player". This can be used to find the first player to a certain number of objects, or the first player to reach a certain score - + * - **YAML Key** + * - ``Lose`` -.. toctree:: - :maxdepth: 5 - :hidden: - /reference/GDY/Environment/Termination/terminationCondition/index diff --git a/docs/reference/GDY/Environment/Termination/Win/index.rst b/docs/reference/GDY/Environment/Termination/Win/index.rst index 3f3bb33ab..20c4d817e 100644 --- a/docs/reference/GDY/Environment/Termination/Win/index.rst +++ b/docs/reference/GDY/Environment/Termination/Win/index.rst @@ -7,26 +7,24 @@ Win Conditions :Description: If any of these conditions are met, the player associated with this condition will win the game. -.. list-table:: +:Possible Values: - * - **Data Type** - - **YAML Key** - * - array - - ``Win`` +.. list-table:: + * - **Value** + - **Type** + - **Description** + * - V1 Termination Conditions + - array + - V1 Termination Conditions + * - V2 Termination Conditions + - array + - V2 Termination Conditions -:Array Type: .. list-table:: - * - **Type** - - **Description** - * - :ref:`Termination Conditions<#/properties/Environment/properties/Termination/definitions/terminationCondition>` - - When a termination condition is met, the game will reset itself. If there are multiple players, the termination arguments are expanded internally "per player". This can be used to find the first player to a certain number of objects, or the first player to reach a certain score - + * - **YAML Key** + * - ``Win`` -.. toctree:: - :maxdepth: 5 - :hidden: - /reference/GDY/Environment/Termination/terminationCondition/index diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV1/eq/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV1/eq/index.rst new file mode 100644 index 000000000..6387fa32b --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV1/eq/index.rst @@ -0,0 +1,36 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/eq: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/eq + +Equals +====== + +:Description: Check if the arguments are equal + +.. list-table:: + + * - **Data Type** + - **YAML Key** + - **Max Items** + - **Min Items** + * - array + - ``eq`` + - 2 + - 2 + + +:Array Type: + +.. list-table:: + + * - **Type** + - **Description** + * - :ref:`Termination Arguments<#/properties/Environment/properties/Termination/definitions/terminationConditionV1/definitions/terminationArgument>` + - An argument to the termination condition. If there are multiple players, then these arguments expand internally as "per player" + + +.. toctree:: + :maxdepth: 5 + :hidden: + + /reference/GDY/Environment/Termination/terminationConditionV1/terminationArgument/index diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV1/gt/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV1/gt/index.rst new file mode 100644 index 000000000..a217dbe63 --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV1/gt/index.rst @@ -0,0 +1,36 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/gt: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/gt + +Greater Than +============ + +:Description: Check if the first argument is greater than the second + +.. list-table:: + + * - **Data Type** + - **YAML Key** + - **Max Items** + - **Min Items** + * - array + - ``gt`` + - 2 + - 2 + + +:Array Type: + +.. list-table:: + + * - **Type** + - **Description** + * - :ref:`Termination Arguments<#/properties/Environment/properties/Termination/definitions/terminationConditionV1/definitions/terminationArgument>` + - An argument to the termination condition. If there are multiple players, then these arguments expand internally as "per player" + + +.. toctree:: + :maxdepth: 5 + :hidden: + + /reference/GDY/Environment/Termination/terminationConditionV1/terminationArgument/index diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV1/gte/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV1/gte/index.rst new file mode 100644 index 000000000..096d539fe --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV1/gte/index.rst @@ -0,0 +1,36 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/gte: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/gte + +Greater Than Or Equal +===================== + +:Description: Check if the first argument is greater than or equal to the second + +.. list-table:: + + * - **Data Type** + - **YAML Key** + - **Max Items** + - **Min Items** + * - array + - ``gte`` + - 2 + - 2 + + +:Array Type: + +.. list-table:: + + * - **Type** + - **Description** + * - :ref:`Termination Arguments<#/properties/Environment/properties/Termination/definitions/terminationConditionV1/definitions/terminationArgument>` + - An argument to the termination condition. If there are multiple players, then these arguments expand internally as "per player" + + +.. toctree:: + :maxdepth: 5 + :hidden: + + /reference/GDY/Environment/Termination/terminationConditionV1/terminationArgument/index diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV1/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV1/index.rst new file mode 100644 index 000000000..a50367ab7 --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV1/index.rst @@ -0,0 +1,44 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV1: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV1 + +Termination Conditions V1 +========================= + +:Description: When a termination condition is met, the game will reset itself. If there are multiple players, the termination arguments are expanded internally "per player". This can be used to find the first player to a certain number of objects, or the first player to reach a certain score + +.. list-table:: + + * - **Data Type** + * - object + + +:Properties: + +.. list-table:: + + * - **Property** + - **Required** + * - :ref:`eq <#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/eq>` + - + * - :ref:`neq <#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/neq>` + - + * - :ref:`gt <#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/gt>` + - + * - :ref:`gte <#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/gte>` + - + * - :ref:`lt <#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/lt>` + - + * - :ref:`lte <#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/lte>` + - + + +.. toctree:: + :hidden: + + eq/index + neq/index + gt/index + gte/index + lt/index + lte/index diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV1/lt/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV1/lt/index.rst new file mode 100644 index 000000000..b559ba1da --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV1/lt/index.rst @@ -0,0 +1,36 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/lt: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/lt + +Less Than +========= + +:Description: Check if the first argument is less than the second + +.. list-table:: + + * - **Data Type** + - **YAML Key** + - **Max Items** + - **Min Items** + * - array + - ``lt`` + - 2 + - 2 + + +:Array Type: + +.. list-table:: + + * - **Type** + - **Description** + * - :ref:`Termination Arguments<#/properties/Environment/properties/Termination/definitions/terminationConditionV1/definitions/terminationArgument>` + - An argument to the termination condition. If there are multiple players, then these arguments expand internally as "per player" + + +.. toctree:: + :maxdepth: 5 + :hidden: + + /reference/GDY/Environment/Termination/terminationConditionV1/terminationArgument/index diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV1/lte/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV1/lte/index.rst new file mode 100644 index 000000000..89829ca7e --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV1/lte/index.rst @@ -0,0 +1,36 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/lte: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/lte + +Less Than Or Equal +================== + +:Description: Check if the first argument is less than or equal to the second + +.. list-table:: + + * - **Data Type** + - **YAML Key** + - **Max Items** + - **Min Items** + * - array + - ``lte`` + - 2 + - 2 + + +:Array Type: + +.. list-table:: + + * - **Type** + - **Description** + * - :ref:`Termination Arguments<#/properties/Environment/properties/Termination/definitions/terminationConditionV1/definitions/terminationArgument>` + - An argument to the termination condition. If there are multiple players, then these arguments expand internally as "per player" + + +.. toctree:: + :maxdepth: 5 + :hidden: + + /reference/GDY/Environment/Termination/terminationConditionV1/terminationArgument/index diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV1/neq/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV1/neq/index.rst new file mode 100644 index 000000000..7f65591c9 --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV1/neq/index.rst @@ -0,0 +1,36 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/neq: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV1/properties/neq + +Not Equals +========== + +:Description: Check if the arguments are not equal + +.. list-table:: + + * - **Data Type** + - **YAML Key** + - **Max Items** + - **Min Items** + * - array + - ``neq`` + - 2 + - 2 + + +:Array Type: + +.. list-table:: + + * - **Type** + - **Description** + * - :ref:`Termination Arguments<#/properties/Environment/properties/Termination/definitions/terminationConditionV1/definitions/terminationArgument>` + - An argument to the termination condition. If there are multiple players, then these arguments expand internally as "per player" + + +.. toctree:: + :maxdepth: 5 + :hidden: + + /reference/GDY/Environment/Termination/terminationConditionV1/terminationArgument/index diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV1/terminationArgument/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV1/terminationArgument/index.rst new file mode 100644 index 000000000..ff95e6725 --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV1/terminationArgument/index.rst @@ -0,0 +1,33 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV1/definitions/terminationArgument: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV1/definitions/terminationArgument + +Termination Arguments +===================== + +:Description: An argument to the termination condition. If there are multiple players, then these arguments expand internally as "per player" + +:Possible Values: + +.. list-table:: + + * - **Value** + - **Type** + - **Description** + * - ``\w+`` + - string + - Any global variable + * - ``\w+:count`` + - string + - Returns the number of objects of the object name before the colon, for example ``flower:count`` or ``car:count`` + * - ``_steps`` + - string + - Returns the number of game ticks that have passed + * - ``_score`` + - string + - The current score + * - ``[integer]`` + - integer + - Any Integer value + + diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV2/Conditions/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV2/Conditions/index.rst new file mode 100644 index 000000000..b10e4bbbd --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV2/Conditions/index.rst @@ -0,0 +1,32 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/Conditions: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/Conditions + +Conditions +========== + +:Description: If any of these conditions are met, the game will end and distribute rewards to the associated players. + +.. list-table:: + + * - **Data Type** + - **YAML Key** + * - array + - ``Conditions`` + + +:Array Type: + +.. list-table:: + + * - **Type** + - **Description** + * - :ref:`Termination Conditions V1<#/properties/Environment/properties/Termination/definitions/terminationConditionV1>` + - When a termination condition is met, the game will reset itself. If there are multiple players, the termination arguments are expanded internally "per player". This can be used to find the first player to a certain number of objects, or the first player to reach a certain score + + +.. toctree:: + :maxdepth: 5 + :hidden: + + /reference/GDY/Environment/Termination/terminationConditionV1/index diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV2/OpposingReward/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV2/OpposingReward/index.rst new file mode 100644 index 000000000..b0ec17c44 --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV2/OpposingReward/index.rst @@ -0,0 +1,17 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/OpposingReward: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/OpposingReward + +Opposing Reward +=============== + +:Description: The reward given to other agents if this condition is met. + +.. list-table:: + + * - **Data Type** + - **YAML Key** + * - integer + - ``OpposingReward`` + + diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV2/Reward/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV2/Reward/index.rst new file mode 100644 index 000000000..be0d051d6 --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV2/Reward/index.rst @@ -0,0 +1,17 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/Reward: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/Reward + +Reward +====== + +:Description: The reward given to the agent if this conditions is met. + +.. list-table:: + + * - **Data Type** + - **YAML Key** + * - integer + - ``Reward`` + + diff --git a/docs/reference/GDY/Environment/Termination/terminationConditionV2/index.rst b/docs/reference/GDY/Environment/Termination/terminationConditionV2/index.rst new file mode 100644 index 000000000..aa67e7ef9 --- /dev/null +++ b/docs/reference/GDY/Environment/Termination/terminationConditionV2/index.rst @@ -0,0 +1,35 @@ +.. _#/properties/Environment/properties/Termination/definitions/terminationConditionV2: + +.. #/properties/Environment/properties/Termination/definitions/terminationConditionV2 + +Termination Conditions V2 +========================= + +:Description: When a termination condition is met, the game will reset itself. If there are multiple players, the termination arguments are expanded internally "per player". This can be used to find the first player to a certain number of objects, or the first player to reach a certain score + +.. list-table:: + + * - **Data Type** + * - object + + +:Properties: + +.. list-table:: + + * - **Property** + - **Required** + * - :ref:`Conditions <#/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/Conditions>` + - + * - :ref:`Reward <#/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/Reward>` + - + * - :ref:`OpposingReward <#/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/OpposingReward>` + - + + +.. toctree:: + :hidden: + + Conditions/index + Reward/index + OpposingReward/index diff --git a/python/setup.py b/python/setup.py index f30016c60..6873b62b6 100644 --- a/python/setup.py +++ b/python/setup.py @@ -71,7 +71,7 @@ def griddly_package_data(config='Debug'): setup( name='griddly', - version="1.0.2", + version="1.1.0", author_email="chrisbam4d@gmail.com", description="Griddly Python Libraries", long_description=long_description, diff --git a/resources/gdy-schema.json b/resources/gdy-schema.json index a9198b1c4..84c4c4903 100644 --- a/resources/gdy-schema.json +++ b/resources/gdy-schema.json @@ -309,7 +309,8 @@ "oneOf": [ { "type": "array", - "description": "V1 termination Conditions", + "title": "V1 Termination Conditions", + "description": "V1 Termination Conditions", "additionalItems": false, "items": { "$ref": "#/properties/Environment/properties/Termination/definitions/terminationConditionV1" @@ -317,7 +318,8 @@ }, { "type": "array", - "description": "V2 termination Conditions", + "title": "V2 Termination Conditions", + "description": "V2 Termination Conditions", "additionalItems": false, "items": { "$ref": "#/properties/Environment/properties/Termination/definitions/terminationConditionV2" @@ -333,7 +335,8 @@ "oneOf": [ { "type": "array", - "description": "V1 termination Conditions", + "title": "V1 Termination Conditions", + "description": "V1 Termination Conditions", "additionalItems": false, "items": { "$ref": "#/properties/Environment/properties/Termination/definitions/terminationConditionV1" @@ -341,7 +344,8 @@ }, { "type": "array", - "description": "V2 termination Conditions", + "title": "V2 Termination Conditions", + "description": "V2 Termination Conditions", "additionalItems": false, "items": { "$ref": "#/properties/Environment/properties/Termination/definitions/terminationConditionV2" @@ -357,7 +361,8 @@ "oneOf": [ { "type": "array", - "description": "V1 termination Conditions", + "title": "V1 Termination Conditions", + "description": "V1 Termination Conditions", "additionalItems": false, "items": { "$ref": "#/properties/Environment/properties/Termination/definitions/terminationConditionV1" @@ -365,7 +370,8 @@ }, { "type": "array", - "description": "V2 termination Conditions", + "title": "V2 Termination Conditions", + "description": "V2 Termination Conditions", "additionalItems": false, "items": { "$ref": "#/properties/Environment/properties/Termination/definitions/terminationConditionV2" @@ -376,25 +382,34 @@ }, "definitions": { "terminationConditionV2": { - "Conditions": { - "$id": "#/properties/Environment/properties/Termination/properties/Conditions", - "type": "array", - "title": "Conditions", - "description": "If any of these conditions are met, the game will end and distribute rewards to the associated players.", - "additionalItems": false, - "items": { - "$ref": "#/properties/Environment/properties/Termination/definitions/terminationConditionV1" + "$id": "#/properties/Environment/properties/Termination/definitions/terminationConditionV2", + "type": "object", + "title": "Termination Conditions V2", + "description": "When a termination condition is met, the game will reset itself. If there are multiple players, the termination arguments are expanded internally \"per player\". This can be used to find the first player to a certain number of objects, or the first player to reach a certain score", + "additionalProperties": false, + "properties": { + "Conditions": { + "$id": "#/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/Conditions", + "type": "array", + "title": "Conditions", + "description": "If any of these conditions are met, the game will end and distribute rewards to the associated players.", + "additionalItems": false, + "items": { + "$ref": "#/properties/Environment/properties/Termination/definitions/terminationConditionV1" + } + }, + "Reward": { + "$id": "#/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/Reward", + "type": "integer", + "title": "Reward", + "description": "The reward given to the agent if this conditions is met." + }, + "OpposingReward": { + "$id": "#/properties/Environment/properties/Termination/definitions/terminationConditionV2/properties/OpposingReward", + "type": "integer", + "title": "Opposing Reward", + "description": "The reward given to other agents if this condition is met." } - }, - "Reward": { - "type": "integer", - "title": "Reward", - "description": "The reward given to the agent if this conditions is met." - }, - "OpposingReward": { - "type": "integer", - "title": "Opposing Reward", - "description": "The reward given to other agents if this condition is met." } }, "terminationConditionV1": {