+/* Helpers to init_score_map(), realizing individual filters. */
+static uint8_t score_map_filter_attack(uint8_t filter, uint16_t * score_map,
+ struct Thing * t_eye);
+static uint8_t score_map_filter_flee(uint8_t filter, uint16_t * score_map,
+ struct Thing * t_eye);
+static uint8_t score_map_filter_consume(uint8_t filter, uint16_t * score_map,
+ struct Thing * t_eye);
+static uint8_t score_map_filter_search(uint8_t filter, uint16_t * score_map,
+ struct Thing * t_eye);
+
+/* get_dir_to_nearest_target() helper: Prepare "score_map" for dijkstra_map(). */
+static void init_score_map(char filter, uint16_t * score_map, uint32_t map_size,
+ struct Thing * t_eye);
+
+/* From "targets" select random "cmp" match as directory by order in "dirs". */
+static char rand_target_dir(char * dirs, uint16_t cmp, uint16_t * targets);
+
+/* Helper to get_dir_to_nearest_target(). */
+static char get_dir_from_neighbors(char filter, struct Thing * t_eye,
+ uint16_t * score_map);
+
+/* Set (if possible) as "t_eye"'s command a move to the path to the path-wise
+ * nearest target that is not "t_eye" and fits criteria set by "filter". On
+ * success, return !0, else 0. Values for "filter":
+ * "a": thing in FOV is animate, but of a type that is not "t_eye"'s, and
+ * starts out weaker than it is; build path as avoiding things of "t_eye"'s
+ * type
+ * "f": neighbor cell (not inhabited by any animate thing) further away from
+ * animate thing not further than x steps away and in FOV and of a type
+ * that is not "t_eye"'s, and starts out stronger or as strong as "t_eye"
+ * is currently; or (cornered), if no such flight cell, but thing of above
+ * criteria is in neighbor cell, that cell
+ * "c": thing in memorized map is consumable
+ * "s": memory map cell with greatest-reachable degree of unexploredness
+ */
+static uint8_t get_dir_to_nearest_target(struct Thing * t_eye, char filter);
+
+/* Return 1 if any thing not "t_eye" is known and fulfills some criteria defined
+ * by "filter", else 0. Values for "filter":
+ * "a" or "f": thing in FOV is animate, but of type that not that of "t_eye",
+ * and starts out weaker ("a") / stronger ("f") than "t_eye" is
+ * "c" : thing in memorized map is consumable