Monty.Attention.GoalFilter.HardGoalFilter (ExTbpMonty.Core v0.1.0)

Copy Markdown View Source

Keep only the goals that land in a place attention wants looked at: Monty's attention/goal_filter.py::HardGoalFilter.

The rules, in Monty's order:

  • an empty grid filters nothing — it has no opinion yet;
  • a goal that lands outside the grid is dropped, unless every voxel is inhibited, in which case the grid means "not here" everywhere and a goal elsewhere is as good as any;
  • a goal in an inhibited voxel is dropped;
  • a goal in a positively weighted voxel is kept.

A goal that carries no location is never filtered: it is not a place, so there is nothing to look up, and the filter's job is about places. Such goals come back after the ones that were looked up, in Monty's order.