Closed oneturkmen closed 5 years ago
https://github.com/CodeReclaimers/neat-python/blob/e3dbe77c0d776eae41d598e6439e6ac02ab90b18/neat/graphs.py#L3
If I run the function above with the following inputs:
connections = [(2, 4), (1, 5), (4, 6), (5, 6), (6, 3)] test = (5, 4)
connections = [(2, 4), (1, 5), (4, 6), (5, 6), (6, 3)]
test = (5, 4)
it returns False. I think it should return True instead since (5,4) creates a cycle and the network previously hasn't had any cycles. Is it working correctly?
False
True
(5,4)
The functions in the graphs module assume the graphs are directed; for an undirected graph (5,4) would create a cycle, but not in a directed graph.
@CodeReclaimers makes sense now. Thanks!
https://github.com/CodeReclaimers/neat-python/blob/e3dbe77c0d776eae41d598e6439e6ac02ab90b18/neat/graphs.py#L3
If I run the function above with the following inputs:
connections = [(2, 4), (1, 5), (4, 6), (5, 6), (6, 3)]
test = (5, 4)
it returns
False
. I think it should returnTrue
instead since(5,4)
creates a cycle and the network previously hasn't had any cycles. Is it working correctly?