Skip to content

Commit

Permalink
abstract vision parent
Browse files Browse the repository at this point in the history
  • Loading branch information
roznawsk committed Aug 22, 2024
1 parent 1668f8d commit c01199e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 69 deletions.
6 changes: 4 additions & 2 deletions infant_abm/agents/parent/spatial_vision_parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,18 @@ def _step_pass_toy(self):

def _handle_event_toy_thrown(self, event: ToyThrown):
if self.responsiveness > np.random.rand():
self.rotate_towards(self.model.infant.pos)

if self.relevant_response_probability > np.random.rand():
self._find_toy_nearby(event.toy)

def _handle_event_throw_evaluation(self, event: ThrowEvaluation):
if self.relevant_response_probability > np.random.rand():
self.infant_visible = True
self.rotate_towards(self.model.infant.pos)

def _handle_event_toy_selected(self, event: ToySelected):
if self.relevant_response_probability > np.random.rand():
self.infant_visible = True
self.rotate_towards(self.model.infant.pos)

def _find_toy_nearby(self, toy: Toy):
toys = self.model.get_toys(self.pos, self.TOY_INTERACTION_RANGE)
Expand Down
67 changes: 0 additions & 67 deletions infant_abm/agents/parent/vision_only_parent.py

This file was deleted.

0 comments on commit c01199e

Please sign in to comment.