direction_list=direction_list_observed, movement_list=movement_list_observed) # Check whether location_real and location_expected match if location_real != location_expected: print('Warning: location_expected did not match location_real.') # Update observed maze_visited maze_visited_observed[tuple(location_real)] = 1 percentage_maze_visited_observed = float( np.sum(maze_visited_observed)) / (maze_visited_observed.shape[0] * maze_visited_observed.shape[1]) # Check if the mouse reached final destination if location_real in destination_final: testmouse.found_destination = True testmouse.destinations.append(testmouse.location_defined) # Count number of actions num_actions_1 += (len(path_list) - 1) # Count the length of movements length_movement_1 += length_count(path_list=path_list) # Update location_last location_last = location_real print('location_real', location_real) print('total num_actions', num_actions_1)