Skip to content

SmartRandomBots are not that smart after all #55

@Debilski

Description

@Debilski

When a SmartRandomBot has visited all neighbouring positions, it will always chose the last on in sensible_positions, which puts it into a loop easily. I think initially we had some sort of least-recently-visited logic in there. Should we make it smarter or keep this as an educational bug. :)

else:
# all sensible positions are equally (un)interesting, so pick
# one that we haven't seen already
for next_pos in sensible_positions:
if next_pos not in bot.track:
break
# if we don't break out of the loop early it means that all new
# positions have been visited already, so we just pick the
# last one in the list
return next_pos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions