Erik Ogenvik
0572fd6d4a
Use "props" to get properties.
...
Also unify LocatedEntity Python bindings.
2018-05-14 17:35:19 +02:00
Erik Ogenvik
5b282419be
Finalize conversion to Python 3.
2018-05-07 11:15:26 +02:00
Erik Ogenvik
97a09ae6b0
Conversion to Python 3 through 2to3.
2018-05-07 11:15:26 +02:00
Erik Ogenvik
701d1a7208
Initial work on porting to Python 3.
2018-05-07 11:15:26 +02:00
Erik Ogenvik
7895d1b0aa
Reload minds when python code changes.
...
All thoughts are first persisted and then restored.
2018-05-01 22:23:31 +02:00
Erik Ogenvik
2bbbad4c58
Restructure and add "present" properties.
...
Also make sure that the correct geometry is used whenever possible.
2018-02-20 22:26:27 +01:00
Erik Ogenvik
b509f08597
Fixed incorrect orientation.
2018-02-11 21:12:47 +01:00
Erik Ogenvik
13314ff026
Convert Python scripts to left coords.
2018-02-06 13:45:10 +01:00
Erik Ogenvik
7127d39f13
More work on moving to left hand coord system.
2018-02-06 13:45:10 +01:00
Erik Ogenvik
9e87611433
Only print subgoals if there are any.
2017-09-05 23:10:23 +02:00
Erik Ogenvik
6c2ceee884
Check that parent exists.
2017-09-05 23:08:22 +02:00
Erik Ogenvik
253fd3747d
Provide a fallback vector.
2017-09-05 22:57:40 +02:00
Erik Ogenvik
0286bcd47d
Replace "parents" with "parent".
2017-07-24 15:05:18 +02:00
Erik Ogenvik
7f3f936308
Filter out invalid subgoals.
2017-05-28 21:51:22 +02:00
Erik Ogenvik
fdaf230281
Handle validity check correctly.
2017-05-28 21:51:04 +02:00
Erik Ogenvik
d8eeb05c3d
Revert include optimize for Python files.
...
CLion wasn't as good at optimizing Python as it was at optimizing C++.
This reverts commit 7aaa9b9ba7 .
2017-05-28 16:32:17 +02:00
Erik Ogenvik
7aaa9b9ba7
Optimize includes.
2017-03-19 21:36:52 +01:00
Olek Wojnar
9e1b3b92c3
Fix typos
...
Courtesy of lintian
2016-09-06 22:29:36 -04:00
Erik Ogenvik
0a81e9897f
Added a concept of goal "validity".
...
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.
2016-06-08 22:03:59 +02:00
Erik Ogenvik
ec857b57e5
Handle movement goals not being reachable.
...
Though perhaps we should have a more general mechanism for querying
goals about their validity?
2016-06-08 21:46:37 +02:00
Erik Ogenvik
eed786758e
Better log output with entity's name.
2016-06-08 21:46:37 +02:00
Erik Ogenvik
326c2f6667
Handle subgoals being None.
2016-06-08 21:46:37 +02:00
Erik Ogenvik
374a691735
Allow destination to be set to another entity.
...
This only works for entities that share the same domain.
It also allows for entities to follow other entities.
2016-04-03 21:25:39 +02:00
Erik Ogenvik
924ba32982
Added extra goals to some goals.
...
These are goals that can be injected to run when the parent goal
is fulfilled.
2016-03-30 22:34:44 +02:00
Erik Ogenvik
b5e7861669
Added linger and iterate goals.
2016-03-23 22:23:15 +01:00
Erik Ogenvik
48839bc8e7
Send range on to move_me goal.
2016-03-21 21:50:56 +01:00
Erik Ogenvik
9570196ffb
Don't send Looks for Unseen operations.
...
Since we'll then enter into infinite loops.
2016-03-20 22:48:28 +01:00
Erik Ogenvik
58f3cabb73
Set both location and radius when setting destination.
2016-03-20 22:48:03 +01:00
Erik Ogenvik
fa4eb7bb0b
Limit too long distances.
...
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.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
e76e0fc7ad
Skip movement goals that are unreachable.
...
A goal is considered to be unreachable when all tiles in the awareness area
have been mapped, and no path still could be found.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
5ece4d27e8
Improved error output.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
c1d0bf48c5
Improved querying of paths.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
7c2ab63fca
Dial down logging.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
b683fb3464
Allow for inspection of the path.
...
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.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
14354137a7
Hooked up steering to the move_me goal.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
7b0d30680c
Setup steering.
...
The setup is that steering is handled separately from the normal mind
ticks. At a closer interval (0.2 seconds currently) steering will be
evaluated.
2016-03-19 23:05:13 +01:00
Erik Ogenvik
56caaaeee9
Persist thoughts to server at regular interval.
...
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.
2015-05-26 22:28:14 +02:00
Erik Ogenvik
519d353c22
Mark thinkning ticks as such.
2015-05-24 13:29:42 +02:00
Erik Ogenvik
5c5fca2d24
Rewrote how minds are interacted with.
...
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)
2015-05-24 11:25:08 +02:00
Erik Ogenvik
690ffbbf94
Improve error logging.
2015-05-24 11:25:08 +02:00
Erik Ogenvik
21b6612f76
Use Entity Filters for the Welcome goal.
2015-05-02 00:19:38 +02:00
Erik Ogenvik
4bc649b405
Handle entity references in thoughts.
...
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.
2015-04-29 22:35:22 +02:00
Erik Ogenvik
a3ffe6c714
Check for validity of ops.
2015-04-20 22:29:12 +02:00
Erik Ogenvik
8ce91c656f
Merge remote-tracking branch 'ytaben/entity_filter'
2015-04-18 22:25:27 +02:00
Erik Ogenvik
ec95be3adb
Fixed typo.
2014-12-07 22:14:16 +01:00
Yaroslav Taben
e0e331f08a
Changed move_it_outof_me goal to use EntityFilter.
...
The goal now searches for entities to drop within the
inventory (contains property) of a mind that used
this goal.
2014-09-27 18:30:33 -04:00
Yaroslav Taben
550e6b8db6
Changed accompany goal to use entity filter.
...
With this change, the goal can still be created focusing on
an entity with specified ID, but it now also supports wider
range of criteria.
2014-08-25 15:08:47 -04:00
Yaroslav Taben
05481fb2e5
Renamed filter to entity_filter in python to avoid a conflict
...
filter name conflicts with built-in filter method and causes
confusion
2014-08-14 17:09:27 -04:00
Yaroslav Taben
80643d4de6
Changed avoid goal to use Entity Filter.
2014-08-08 21:05:07 -04:00
Yaroslav Taben
38cf22f027
Changed recall_place method in Memory.py to use EntityFilter
2014-08-08 18:22:57 -04:00