Skip to content

Commit 262a478

Browse files
committed
Update readme
1 parent a8704e8 commit 262a478

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,20 @@ For Unity 3D:
3535

3636
## Getting started
3737

38-
For planning you need a model (Agent), a goal and, if available, a heuristic. I will use [Brent Owens' woodcutter](https://gamedevelopment.tutsplus.com/tutorials/goal-oriented-action-planning-for-a-smarter-ai--cms-20793) agent as an example.
38+
Planning requires a *model* and a *goal*; if available, also provide a *heuristic*.
39+
I will borrow [Brent Owens' woodcutter](https://gamedevelopment.tutsplus.com/tutorials/goal-oriented-action-planning-for-a-smarter-ai--cms-20793) example.
3940

40-
In this case, a woodcutter has the *GetAxe*, *ChopLog* and *CollectBranches* actions. Here's our version of the wood chopper model
41+
A woodcutter has the *GetAxe*, *ChopLog* and *CollectBranches* actions. Here is our implementation of the woodcutter planning model:
4142

4243
```cs
4344
using Activ.GOAP;
4445

45-
[Serializable] // Helps cloning model state
46+
[Serializable] // Helps cloning model state (or implement `Clonable`)
4647
public class WoodChopper : Agent{
4748

4849
public bool hasAxe, hasFirewood;
4950

50-
// TODO - should cache the list of actions
51-
// Available actions may change as the model is modified
51+
// In production, cache your action list(s) to avoid GC overheads
5252
public Func<Cost>[] Actions() => new Func<Cost>[]{
5353
ChopLog, GetAxe, CollectBranches
5454
};

0 commit comments

Comments
 (0)