Production graph prediction

In my game, I have an extensive production graph that defines what the player can produce in-game. The edges are processes, the nodes are entity types. A process can have inputs, outputs and require tools, all of which are entity types.I would like for the player to see next to each entity type, whether it is attainable. To do this, I am using a naive approach with a depth first search for each entity type. The problem is that this won’t work when there are loops in the production graph. Which other algorithm is useful here? Note that I am disregarding the amounts needed,  I am just looking to give a hint about what is possible to attain, so any item that is present in greater than 0 amounts will…


Link to Full Article: Production graph prediction