in reply to Develop a Tree
and browsing this datastructure with some tree search algorithm. I myself prefer bidirectional search, the working example is given e.q. in this node, but i think that your network is small enough for using the breadth-first search without any significant performance loss.%network_map = ( 12567 => # the machine id [335, 456, 338], # the id's of machines it is directly connected to 335 => [12657, 558, 667, 333] # etc )
Sorry for my English :)
|
|---|