nasa / OnAIR

The On-board Artificial Intelligence Research (OnAIR) Platform is a framework that enables AI algorithms written in Python to interact with NASA's cFS. It is intended to explore research concepts in autonomous operations in a simulated environment.
66 stars 15 forks source link

Update flow through AI constructs #120

Closed asgibson closed 7 months ago

asgibson commented 8 months ago

The current flow of low-level and high-level data through the constructs is not how it should be. Learners do not access high-level data results from Knowledge constructs. Planners are not currently updated or allowed to render reason. Complex reasoners are unable to see high-level data from previous complex reasoners.

In addition, Knowledge constructs are having render reason called too many times and in an odd order. Knowledge constructs will all update, then reason. Learners will all update, then reason. Planners will all update, then reason. Complex reasoners will individually update and reason prior to the next complex reasoner updating and reasoning.

asgibson commented 7 months ago

The |= operator used in complex reasoners: https://github.com/nasa/OnAIR/blob/b0c3757e4d92499435a6a410a3ffaa9268f6f11a/onair/src/reasoning/complex_reasoning_interface.py#L28 Has only been in Python since 3.9. Because of the recent decision to provide more backward compatibility for Python versions, this needs reverted to use the dict function update instead of the |= operator