Calling "is_valid" checks whether the goal actually can be fulfilled.
If it can't be, False is returned.
By default all Goals return True unless a "validity" function is supplied
in the constructor.
For now we only use it for checking whether movement goals can be reached.
If the character wants to travel too far, we shouldn't try to map the whole
path straight away. Instead we'll cut down on the lenght, and increase the
acceptable radius.
This works since the AI will issue a new destination on its next Tick.
Authoring clients can send a Think op, wrapping a Get op with a "path"
attribute to get information about the path. The mind code will then
send back a list of points for the path.
Every 30 seconds the thoughts are persisted to the server, by sending a
Think op which wraps a Set op with the name of "persistthoughts".
An improvement to this would be to only send these ops when the thoughts
actually have changed.
Instead of using separate Commune and Think goals depending on
whether we're querying for or setting thoughts we now instead solely use
the Think op. This op wraps another op, which is then used to determine
what to do. The ops that are supported are: Set, Get, Delete and Look
Think(Set): sets new thoughts and updates existing ones, if an id is
supplied.
Think(Get): get all or specific thoughts (replaces Commune)
Think(Look): inspects a specific goal
Think(Delete): deletes all or a specific thoughts (i.e. both goals and
knowledge)
Entities are references using a format of "'$eid:...'".
For example, an entity with id 2 would be references as "'$eid:2'".
This specific pattern is handled specifically by both the importer, the
exporter and the minds themselves, allowing for entities to be properly
restored with correct minds.
The way goals are authored is refactoed so that each goal gets assigned
an id. The client can then refer to this id when issuing both Think and
Commune commands. This makes it much easier for the client to properly
author the goals, independent of the "subject" they are attached to
(which is an Interlinguish construct which isn't relevant to direct goal
introspection).