Simple GitHub Issue Handled(?) By Copilot Workspace
github.com
github.com
Caveats: 1. It looks very neat 2. It took nearly 5 minutes to come up with the solution after specification, planning, and then opening a pull request 3. the proposed solution is not actually true. Although it catches a valid case by checking if there is a row in the transaction matrix summed up to 1, this case is already prevented in `__init__`. A more plausible solution would be to check if the current state has a diagonal 1 in the transition matrix, which results in the random walker going back to the same state after that.