<commit_before>Interface Documentation
=======================


Abstract
--------

The interface is a class that should be instantiated for each type of interfacing,
for instance when interfacing to a simulated environment, or a real environment.

An instance of a interface should have means of sending and receiving information.

Sending is achieved through Commanders and receiving Updaters, in between there may
be filters to normalize the data (convert units, reduce errors or invalidate undesired
data).


Diagram
-------

                    [External Entity]

           ^               ^                 |              |
           |               |                 v              v
    +--------------+ +--------------+  +-[receive]--+  +-[receive]--+
    | commander[0] | | commander[1] |  | updater[0] |  | updater[1] |
    +---[send]-----+ +---[send]-----+  +------|-----+  +-----|-----+
           ^               ^                  \______________/
           |               |         ______________/
           \_______________/        /
                   |                |
                   |                v
         +-[filter_commands]-[filter_updates]-+
         |         ^   filter[2]    |         |
         +---------|----------------|---------+
                   |                |
                   |                v
         +-[filter_commands]-[filter_updates]-+
         |         ^   filter[1]    |         |
         +---------|----------------|---------+
                   |                |
                   |                v
         +-[filter_commands]-[filter_updates]-+
         |         ^   filter[0]    |         |
         +---------|----------------|---------+
                   |                |
             +-----|----------------|-----+
             |         interface          |
             +----------[step]------------+
                          ^
                          |
                    [Intelligence]


Mechanism
---------

Each updater rolls on its own process or thread (depending on the system) and is
may be constantly listenting on a port for incoming packages, while commanders
are only called when the interfece is stepped.

The list of filters may intercept updates and commmands. Whenever an update arrives
each filter will be called on filter_updates with the list of updates that arrived,
if it returns, the returned value is passed to the next filter. The order in which
filters are called are reversed when commands are sent, that is to allow filters
imidiate/final access to the external entity or the inteligence.<commit_msg>Typos fixed in the doc/interface.txt.<commit_after>Interface Documentation
=======================


Abstract
--------

The interface is a class that should be instantiated for each type of interfacing,
for instance when interfacing to a simulated environment, or a real environment.

An instance of an interface should have means of sending and receiving information.

Sending is achieved through Commanders and receiving Updaters. In between there may
be filters to normalize the data (convert units, reduce errors or invalidate undesired
data).


Diagram
-------

                    [External Entity]

           ^               ^                 |              |
           |               |                 v              v
    +--------------+ +--------------+  +-[receive]--+  +-[receive]--+
    | commander[0] | | commander[1] |  | updater[0] |  | updater[1] |
    +---[send]-----+ +---[send]-----+  +------|-----+  +-----|-----+
           ^               ^                  \______________/
           |               |         ______________/
           \_______________/        /
                   |                |
                   |                v
         +-[filter_commands]-[filter_updates]-+
         |         ^   filter[2]    |         |
         +---------|----------------|---------+
                   |                |
                   |                v
         +-[filter_commands]-[filter_updates]-+
         |         ^   filter[1]    |         |
         +---------|----------------|---------+
                   |                |
                   |                v
         +-[filter_commands]-[filter_updates]-+
         |         ^   filter[0]    |         |
         +---------|----------------|---------+
                   |                |
             +-----|----------------|-----+
             |         interface          |
             +----------[step]------------+
                          ^
                          |
                    [Intelligence]


Mechanism
---------

Each updater rolls on its own process or thread (depending on the system) and it
may be constantly listenting on a port for incoming packages, while commanders
are only called when the interface is stepped.

The list of filters may intercept updates and commmands. Whenever an update arrives,
each filter will be called on filter_updates with the list of updates that arrived,
if it returns, the returned value is passed to the next filter. The order in which
filters are called are reversed when commands are sent, that is to allow filters
immediate/final access to the external entity or the inteligence.
{'fraction_non_alphanumeric': 0.16543069024529378, 'fraction_numerical': 0.0026621030614185207, 'mean_word_length': 1.0395502132609538, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3258508', 'n_tokens_mistral': 1251, 'n_tokens_neox': 1134, 'n_words': 393}