toybox-rs / Toybox

The Machine Learning Toybox for testing the behavior of autonomous agents.
http://toybox.rs
27 stars 12 forks source link

A few bugs in toybox/interventions/amidar.py #172

Closed salahzoubi closed 4 years ago

salahzoubi commented 4 years ago
  1. For intervention.get_random_track_position() https://github.com/toybox-rs/Toybox/blob/aac1557c32b88b06b11d083a177e1415ff56cb2f/toybox/interventions/amidar.py#L305 you get the following error:

Traceback (most recent call last): File "/Users/salahalzubi/honors/Robust_Agents/exploit_bot.py", line 385, in <module> intervention.get_random_track_position() File "/Users/salahalzubi/honors/Robust_Agents/toybox/interventions/amidar.py", line 295, in get_random_track_position rand_tile = self.get_random_tile(lambda tile, board: tile.tag != 'Empty') File "/Users/salahalzubi/honors/Robust_Agents/toybox/interventions/amidar.py", line 288, in get_random_tile if pred(tile): TypeError: <lambda>() missing 1 required positional argument: 'board'

  1. For intervention.set_player_random_start() https://github.com/toybox-rs/Toybox/blob/aac1557c32b88b06b11d083a177e1415ff56cb2f/toybox/interventions/amidar.py#L443 get the following error:

Traceback (most recent call last): File "/Users/salahalzubi/honors/Robust_Agents/exploit_bot.py", line 385, in <module> intervention.set_player_random_start() File "/Users/salahalzubi/honors/Robust_Agents/toybox/interventions/amidar.py", line 440, in set_player_random_start pos = self.get_random_tile(pred=within_min_manhattan) File "/Users/salahalzubi/honors/Robust_Agents/toybox/interventions/amidar.py", line 288, in get_random_tile if pred(tile): File "/Users/salahalzubi/honors/Robust_Agents/toybox/interventions/amidar.py", line 432, in within_min_manhattan for e in enemies: NameError: name 'enemies' is not defined

  1. Erratic tile.tag behavior in general. For instance intervention.get_tile_by_pos(-1, -1).tag returns Unpainted when I'm guessing it should return either Empty or something else.
etosch commented 4 years ago

I don't understand (3); what do you mean by erratic? Does it change over time? Why do you think it should be Empty?

salahzoubi commented 4 years ago

I just found it odd that an out-of-bounds position can be fetched and is considered a tile. I get the impression that an unpainted tile has the potential to be painted once visited (which for -1,-1 is impossible).