A re-implementation of NACE, as a pypi package, with a cleaner more general interface.
Project description
An observational learner, creating a model of the world from subsequent observations, which can resolve
conflicting information, and plan many steps ahead, in an extremely sample efficient manner.
Background
This project builds upon an implementation of X's NACE work (Paper under review) observational learner, which in turn was based on Berick Cook's AIRIS, with added support for partial observability, capabilities to handle non-deterministic and non-stationary environments, as well as changes external to the agent. X achieved this by incorporating relevant components of Non-Axiomatic Logic (NAL).
The aim of this project is to convert the above work, into a foundation that extra experiments can be performed on.
Examples
Data Structures
= Rule Object =:
Action_Value_Precondition: Prediction: State Value Deltas
Action State Preconditions (old world) y x board score key
values precondition0 precondition1 precondition2 value delta delta
excl y x y x
score
((left, (0,), (0, 0, ' '), (0, 1, 'x'), (0, 2, 'u')), (0, 0, 'x', (0, 0))),
((right, (0,), (0, -1, 'x'), (0, 0, 'o')), (0, 0, 'o', (0, 0))),
The following Action_Value_Precondition:
((right, (0,), (0, -1, 'x'), (0, 0, 'o'))
can be read: Match if there is a 'o' at the focus point, and a 'x' to the left of it, and the action is right.
The following Action_Value_Precondition, Prediction:
((left, (0,), (0, 0, ' '), (0, 1, 'x'), (0, 2, 'u')), (0, 0, 'x', (0, 0))),
can be read: Match if there is a ' ' at the focus point,
and a 'x' to the right of it,
and a 'u' to the right of the 'x',
and the action is left
And the prediction after the action is:
the 'x' will appear at 0,0 relative to the focus point.
and there is no change to our score
The following Action_Value_Precondition, Prediction:
((right, (0,), (0, -1, 'x'), (0, 0, 'f')), (0, 0, 'x', (1, 0))),
can be read: Match if there is a 'f' at the focus point,
and a 'x' to the left of it,
and the action is right
And the prediction after the action is:
the 'x' will appear at 0,0 relative to the focus point.
the first State Delta (score) will be +1
the first State Delta (key) will be +0
Rule_Evidence Object Dictionary
positive negative
evidence evidence
counter counter
{ ((right, ... )) : ( 1, 0 ) }
{ ((left, (), (0, 0, ' '), (0, 1, 'x')), (0, 0, 'x', (0,))): (1,0) }
Positive Evidence, and Negative Evidence can be used to calculate:
Frequency = positive_count / (positive_count + negative_count)
Confidence = (positive_count + negative_count) / (positive_count + negative_count + 1)
Truth_expectation = confidence * (frequency - 0.5) + 0.5
Location:
xy_loc tuple (x,y) not (0,0) is top left
State Values
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file nace-0.0.10.tar.gz
.
File metadata
- Download URL: nace-0.0.10.tar.gz
- Upload date:
- Size: 42.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a5677e778c1b179801e8f7e3cb2498317f7df639a88a54ea8dc46b1210aa9b2 |
|
MD5 | f4efb52ab818996d09486ee5dd3caf67 |
|
BLAKE2b-256 | c837a9709c113d131a8d7d9dc3ab292905ac9fe2d20cdacc7cb71673b923b16a |