HackerTrans
TopNewTrendsCommentsPastAskShowJobs

Simple GitHub Issue Handled(?) By Copilot Workspace(github.com)

1 points·by sadrasabouri·vor 2 Jahren·1 comments
github.com
Simple GitHub Issue Handled(?) By Copilot Workspace

https://github.com/sadrasabouri/pyrandwalk/pull/20/files

1 comments

sadrasabouri·vor 2 Jahren
Today I got access to the new GitHubNext product, Copilot Workspace. I decided to test it on an old tiny Python package I developed three years ago for fun. The library is meant to simulate random walks. At that time I opened an issue for handling dead-end cases by randomly jumping to new states. Today I used the same issue for the starter. You can see the results of Copilot Workspace.

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.