mkazin / three-games

Game recommendation system using Steam API
MIT License
3 stars 3 forks source link

Properly solve the backtracking issue from 10/8 #2

Closed mkazin closed 7 years ago

mkazin commented 7 years ago

When I was working on traversing the graph I ran into some issues in the recursion. First among these was recursing over already-queried Players (who had also been appended into the player_cache). My naive solution to this was first to add a second parameter into the recursion function to allow checking for backtracking. I then determined I could simplify this by using player_cache. I now believe this may have been a mistake. The reason: a Player skipped due to backtracking may require different handling than one due to graph_depth.

Example:

mkazin commented 7 years ago

Reminder to self: the keyword here was "due to graph_depth". The unit test I wrote yesterday had a high depth. Reduce that to get the expected test failure.