(2020-03-21, 15:45)garbear Wrote: To get zero config, I had to accept that the underlying data was a graph, requiring graph algorithms. Would you agree that we're storing a graph?
Well graph algorithms make more sense as the different controller profiles do interact with each other as well. So they are all interconnected, and now that I think about it, the tree topology may also restrict a lot of things, as if we map a faulty controller first, the rest would be affected due to the heirarchy.
(2020-03-21, 15:45)garbear Wrote: Here's another fun question, can you find the algorithm in my mockup?
Well player one is connected to a single controller so that's that
.
For player 2 we have 3 different multi taps which I name as A, B and C according to the heirarchy. So we can see that A is connected to B, C and two other controllers while B and C are connected to 4 other controllers.
To search for a specific controller we can either use DFS or BFS for the analysis algorithm. But since we have less number of nodes we can use DFS for more space efficiency at the cost of a little more time to analyse all branches. But at this stage both are pretty much interchangeable.
This will allow the player to chose from a data stack containing all the player profiles topologically sorted.
Also if the controller topology actually represent the controller profiles saved for a driver, we need to search for the most compatible controller profile for a particular game and thus use that for our driver device. If not present then we can then ask for a mapping procedure.