From 39e5b73ee18e443b2d01968e0efa2b69c0209d49 Mon Sep 17 00:00:00 2001 From: Jan Werder Date: Sat, 16 Dec 2023 22:48:17 +0100 Subject: [PATCH 1/5] Added Goal specification to Arithmetic Postconditions --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 513fc72..dd510f7 100644 --- a/README.md +++ b/README.md @@ -217,6 +217,8 @@ Action heal = new Action( ); ``` +Arithmetic postconditions are meant to be used with [Comparative Goals](#comparative-goals). They don't apply to normal Goals. + #### Parameter Postconditions **Parameter postconditions** are postconditions that copy one of the parameters passed to the action into the agent state. The structure uses a dictionary of string keys and string values, where the keys are the keys to the parameter value being copied and the values are the state key into which you are copying the value. From d262da78486c3b6900fb6ca16fba9cbe48d63ce1 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 16 Dec 2023 23:02:31 +0100 Subject: [PATCH 2/5] Exposed CurrentActionSequences with a Getter --- MountainGoap/Agent.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MountainGoap/Agent.cs b/MountainGoap/Agent.cs index 3551c0a..cb54c2c 100644 --- a/MountainGoap/Agent.cs +++ b/MountainGoap/Agent.cs @@ -19,7 +19,12 @@ public class Agent { /// /// Chains of actions currently being performed by the agent. /// - internal List> CurrentActionSequences = new(); + private List> CurrentActionSequences = new(); + + public List> GetCurrentActionSequences() + { + return CurrentActionSequences; + } /// /// Initializes a new instance of the class. From 6741ea3d5eb3e69d4baa3e696569e5f3483de4ae Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 16 Dec 2023 23:03:32 +0100 Subject: [PATCH 3/5] Revert "Exposed CurrentActionSequences with a Getter" This reverts commit d262da78486c3b6900fb6ca16fba9cbe48d63ce1. --- MountainGoap/Agent.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/MountainGoap/Agent.cs b/MountainGoap/Agent.cs index cb54c2c..3551c0a 100644 --- a/MountainGoap/Agent.cs +++ b/MountainGoap/Agent.cs @@ -19,12 +19,7 @@ public class Agent { /// /// Chains of actions currently being performed by the agent. /// - private List> CurrentActionSequences = new(); - - public List> GetCurrentActionSequences() - { - return CurrentActionSequences; - } + internal List> CurrentActionSequences = new(); /// /// Initializes a new instance of the class. From 3611a4a0e7b2464a07ed7b5e5caa52e2e6ff0c04 Mon Sep 17 00:00:00 2001 From: Chris Muller Date: Mon, 18 Dec 2023 06:43:43 -0500 Subject: [PATCH 4/5] Update README.md with suggested edit. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dd510f7..31ae1cb 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ Action heal = new Action( ); ``` -Arithmetic postconditions are meant to be used with [Comparative Goals](#comparative-goals). They don't apply to normal Goals. +Note that [normal Goals](#goals) use simple equality checks and cannot tell that a value is closer or further away from the goal value. If you want to use an arithmetic postcondition and have the library detect that you are moving closer to your goal, use [Comparative Goals](#comparative-goals) or [Extreme Goals](#extreme-goals). Both of these types of numerically based goals will calculate distance from a numeric goal properly. #### Parameter Postconditions From e046399aa055e6da47b4b722ce298cb1cff880ce Mon Sep 17 00:00:00 2001 From: Chris Muller Date: Mon, 18 Dec 2023 06:44:44 -0500 Subject: [PATCH 5/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 31ae1cb..e8651f1 100644 --- a/README.md +++ b/README.md @@ -217,7 +217,7 @@ Action heal = new Action( ); ``` -Note that [normal Goals](#goals) use simple equality checks and cannot tell that a value is closer or further away from the goal value. If you want to use an arithmetic postcondition and have the library detect that you are moving closer to your goal, use [Comparative Goals](#comparative-goals) or [Extreme Goals](#extreme-goals). Both of these types of numerically based goals will calculate distance from a numeric goal properly. +Note that [normal Goals](#goals) use simple equality checks and cannot tell that a value is closer or further away from the goal value. If you want to use an arithmetic postcondition and have the library detect that you are moving closer to your goal, use [Comparative Goals](#comparative-goals) or [Extreme Goals](#extreme-goals). Both of these types of numerically based goals will calculate distance from a numeric goal value properly. #### Parameter Postconditions