{"action":"created","comment":{"url":"https://api.github.com/repos/zackmdavis/Leafline/pulls/comments/39360314","id":39360314,"diff_hunk":"@@ -134,6 +135,9 @@ pub fn α_β_negamax_search(world: WorldState,\n         if experienced_α >= β {\n             break;\n         }\n+        if (20000.0 - experienced_α.abs()).abs() < 1000.0 {","path":"src/mind.rs","position":17,"original_position":17,"commit_id":"b062759b3915bddb1943a13fc911f75b4b3944ed","original_commit_id":"b062759b3915bddb1943a13fc911f75b4b3944ed","user":{"login":"zackmdavis","id":1076988,"avatar_url":"https://avatars.githubusercontent.com/u/1076988?v=3","gravatar_id":"","url":"https://api.github.com/users/zackmdavis","html_url":"https://github.com/zackmdavis","followers_url":"https://api.github.com/users/zackmdavis/followers","following_url":"https://api.github.com/users/zackmdavis/following{/other_user}","gists_url":"https://api.github.com/users/zackmdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/zackmdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackmdavis/subscriptions","organizations_url":"https://api.github.com/users/zackmdavis/orgs","repos_url":"https://api.github.com/users/zackmdavis/repos","events_url":"https://api.github.com/users/zackmdavis/events{/privacy}","received_events_url":"https://api.github.com/users/zackmdavis/received_events","type":"User","site_admin":false},"body":"(Unfortunately, since I had originally just imitated the pseudocode from *Wikipedia* rather than deeply understanding α-β search as a theorem, it took me a while to convince myself that this is correct. But, yes, it does look correct: α is the top score we're already assured of (in this \"negamax\" implementation, we are always the maximizing player), and if that's in the vicinity of 20000, that means an ultimate endangerment scenario has been found, and we don't need to search anymore. Well done.)","created_at":"2015-09-14T04:12:32Z","updated_at":"2015-09-14T04:12:32Z","html_url":"https://github.com/zackmdavis/Leafline/pull/9#discussion_r39360314","pull_request_url":"https://api.github.com/repos/zackmdavis/Leafline/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/zackmdavis/Leafline/pulls/comments/39360314"},"html":{"href":"https://github.com/zackmdavis/Leafline/pull/9#discussion_r39360314"},"pull_request":{"href":"https://api.github.com/repos/zackmdavis/Leafline/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/zackmdavis/Leafline/pulls/9","id":44889417,"html_url":"https://github.com/zackmdavis/Leafline/pull/9","diff_url":"https://github.com/zackmdavis/Leafline/pull/9.diff","patch_url":"https://github.com/zackmdavis/Leafline/pull/9.patch","issue_url":"https://api.github.com/repos/zackmdavis/Leafline/issues/9","number":9,"state":"open","locked":false,"title":"Stop evaluating positions post-ultimate-endangerment","user":{"login":"FoxLisk","id":1173225,"avatar_url":"https://avatars.githubusercontent.com/u/1173225?v=3","gravatar_id":"","url":"https://api.github.com/users/FoxLisk","html_url":"https://github.com/FoxLisk","followers_url":"https://api.github.com/users/FoxLisk/followers","following_url":"https://api.github.com/users/FoxLisk/following{/other_user}","gists_url":"https://api.github.com/users/FoxLisk/gists{/gist_id}","starred_url":"https://api.github.com/users/FoxLisk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FoxLisk/subscriptions","organizations_url":"https://api.github.com/users/FoxLisk/orgs","repos_url":"https://api.github.com/users/FoxLisk/repos","events_url":"https://api.github.com/users/FoxLisk/events{/privacy}","received_events_url":"https://api.github.com/users/FoxLisk/received_events","type":"User","site_admin":false},"body":"For performance reasons, it's very silly to cling so strictly to the\r\nidea that one *must*, no matter what, evaluate exactly `n` levels deep,\r\nno more, and no less. This leads to ridiculous situations such as\r\nsearching down a completely meaningless and exponentially large tree for\r\nmany minutes when one has already found a winning move.\r\n\r\nUnfortunately the current situation on this commit is not really very\r\ngood. Leafline will happily find that there is a mate, short circuit,\r\nand return you a move that is wildly circuitous, because they are\r\nordered with only preference for material advantage, and leafline does\r\nnot, for example, know about the 50 move rule, or run out of patience at\r\nany time. So this is pretty silly: try running\r\n`./target/release/leafline --depth 50 --from=\"7K/r7/1r6/8/8/8/8/7k b -\"`\r\nto witness it yourself.\r\n\r\nAnyway, I think that the short circuiting is correct, and so this is its\r\nown commit; unfortunately the work to make this playable is not actually\r\ndone.","created_at":"2015-09-14T03:10:04Z","updated_at":"2015-09-14T04:12:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9ddb69f11db18d37d7609fd24ad58454243d7009","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zackmdavis/Leafline/pulls/9/commits","review_comments_url":"https://api.github.com/repos/zackmdavis/Leafline/pulls/9/comments","review_comment_url":"https://api.github.com/repos/zackmdavis/Leafline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zackmdavis/Leafline/issues/9/comments","statuses_url":"https://api.github.com/repos/zackmdavis/Leafline/statuses/b062759b3915bddb1943a13fc911f75b4b3944ed","head":{"label":"zackmdavis:ultimate_endangerment_short_circuiting","ref":"ultimate_endangerment_short_circuiting","sha":"b062759b3915bddb1943a13fc911f75b4b3944ed","user":{"login":"zackmdavis","id":1076988,"avatar_url":"https://avatars.githubusercontent.com/u/1076988?v=3","gravatar_id":"","url":"https://api.github.com/users/zackmdavis","html_url":"https://github.com/zackmdavis","followers_url":"https://api.github.com/users/zackmdavis/followers","following_url":"https://api.github.com/users/zackmdavis/following{/other_user}","gists_url":"https://api.github.com/users/zackmdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/zackmdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackmdavis/subscriptions","organizations_url":"https://api.github.com/users/zackmdavis/orgs","repos_url":"https://api.github.com/users/zackmdavis/repos","events_url":"https://api.github.com/users/zackmdavis/events{/privacy}","received_events_url":"https://api.github.com/users/zackmdavis/received_events","type":"User","site_admin":false},"repo":{"id":40413397,"name":"Leafline","full_name":"zackmdavis/Leafline","owner":{"login":"zackmdavis","id":1076988,"avatar_url":"https://avatars.githubusercontent.com/u/1076988?v=3","gravatar_id":"","url":"https://api.github.com/users/zackmdavis","html_url":"https://github.com/zackmdavis","followers_url":"https://api.github.com/users/zackmdavis/followers","following_url":"https://api.github.com/users/zackmdavis/following{/other_user}","gists_url":"https://api.github.com/users/zackmdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/zackmdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackmdavis/subscriptions","organizations_url":"https://api.github.com/users/zackmdavis/orgs","repos_url":"https://api.github.com/users/zackmdavis/repos","events_url":"https://api.github.com/users/zackmdavis/events{/privacy}","received_events_url":"https://api.github.com/users/zackmdavis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zackmdavis/Leafline","description":"an oppositional strategy game engine","fork":false,"url":"https://api.github.com/repos/zackmdavis/Leafline","forks_url":"https://api.github.com/repos/zackmdavis/Leafline/forks","keys_url":"https://api.github.com/repos/zackmdavis/Leafline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zackmdavis/Leafline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zackmdavis/Leafline/teams","hooks_url":"https://api.github.com/repos/zackmdavis/Leafline/hooks","issue_events_url":"https://api.github.com/repos/zackmdavis/Leafline/issues/events{/number}","events_url":"https://api.github.com/repos/zackmdavis/Leafline/events","assignees_url":"https://api.github.com/repos/zackmdavis/Leafline/assignees{/user}","branches_url":"https://api.github.com/repos/zackmdavis/Leafline/branches{/branch}","tags_url":"https://api.github.com/repos/zackmdavis/Leafline/tags","blobs_url":"https://api.github.com/repos/zackmdavis/Leafline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zackmdavis/Leafline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zackmdavis/Leafline/git/refs{/sha}","trees_url":"https://api.github.com/repos/zackmdavis/Leafline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zackmdavis/Leafline/statuses/{sha}","languages_url":"https://api.github.com/repos/zackmdavis/Leafline/languages","stargazers_url":"https://api.github.com/repos/zackmdavis/Leafline/stargazers","contributors_url":"https://api.github.com/repos/zackmdavis/Leafline/contributors","subscribers_url":"https://api.github.com/repos/zackmdavis/Leafline/subscribers","subscription_url":"https://api.github.com/repos/zackmdavis/Leafline/subscription","commits_url":"https://api.github.com/repos/zackmdavis/Leafline/commits{/sha}","git_commits_url":"https://api.github.com/repos/zackmdavis/Leafline/git/commits{/sha}","comments_url":"https://api.github.com/repos/zackmdavis/Leafline/comments{/number}","issue_comment_url":"https://api.github.com/repos/zackmdavis/Leafline/issues/comments{/number}","contents_url":"https://api.github.com/repos/zackmdavis/Leafline/contents/{+path}","compare_url":"https://api.github.com/repos/zackmdavis/Leafline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zackmdavis/Leafline/merges","archive_url":"https://api.github.com/repos/zackmdavis/Leafline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zackmdavis/Leafline/downloads","issues_url":"https://api.github.com/repos/zackmdavis/Leafline/issues{/number}","pulls_url":"https://api.github.com/repos/zackmdavis/Leafline/pulls{/number}","milestones_url":"https://api.github.com/repos/zackmdavis/Leafline/milestones{/number}","notifications_url":"https://api.github.com/repos/zackmdavis/Leafline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zackmdavis/Leafline/labels{/name}","releases_url":"https://api.github.com/repos/zackmdavis/Leafline/releases{/id}","created_at":"2015-08-08T18:58:59Z","updated_at":"2015-09-08T16:23:08Z","pushed_at":"2015-09-14T03:35:06Z","git_url":"git://github.com/zackmdavis/Leafline.git","ssh_url":"git@github.com:zackmdavis/Leafline.git","clone_url":"https://github.com/zackmdavis/Leafline.git","svn_url":"https://github.com/zackmdavis/Leafline","homepage":null,"size":625,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"zackmdavis:master","ref":"master","sha":"424d8c79f34f7aad5d22c358e95a61b63b82e083","user":{"login":"zackmdavis","id":1076988,"avatar_url":"https://avatars.githubusercontent.com/u/1076988?v=3","gravatar_id":"","url":"https://api.github.com/users/zackmdavis","html_url":"https://github.com/zackmdavis","followers_url":"https://api.github.com/users/zackmdavis/followers","following_url":"https://api.github.com/users/zackmdavis/following{/other_user}","gists_url":"https://api.github.com/users/zackmdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/zackmdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackmdavis/subscriptions","organizations_url":"https://api.github.com/users/zackmdavis/orgs","repos_url":"https://api.github.com/users/zackmdavis/repos","events_url":"https://api.github.com/users/zackmdavis/events{/privacy}","received_events_url":"https://api.github.com/users/zackmdavis/received_events","type":"User","site_admin":false},"repo":{"id":40413397,"name":"Leafline","full_name":"zackmdavis/Leafline","owner":{"login":"zackmdavis","id":1076988,"avatar_url":"https://avatars.githubusercontent.com/u/1076988?v=3","gravatar_id":"","url":"https://api.github.com/users/zackmdavis","html_url":"https://github.com/zackmdavis","followers_url":"https://api.github.com/users/zackmdavis/followers","following_url":"https://api.github.com/users/zackmdavis/following{/other_user}","gists_url":"https://api.github.com/users/zackmdavis/gists{/gist_id}","starred_url":"https://api.github.com/users/zackmdavis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackmdavis/subscriptions","organizations_url":"https://api.github.com/users/zackmdavis/orgs","repos_url":"https://api.github.com/users/zackmdavis/repos","events_url":"https://api.github.com/users/zackmdavis/events{/privacy}","received_events_url":"https://api.github.com/users/zackmdavis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zackmdavis/Leafline","description":"an oppositional strategy game engine","fork":false,"url":"https://api.github.com/repos/zackmdavis/Leafline","forks_url":"https://api.github.com/repos/zackmdavis/Leafline/forks","keys_url":"https://api.github.com/repos/zackmdavis/Leafline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zackmdavis/Leafline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zackmdavis/Leafline/teams","hooks_url":"https://api.github.com/repos/zackmdavis/Leafline/hooks","issue_events_url":"https://api.github.com/repos/zackmdavis/Leafline/issues/events{/number}","events_url":"https://api.github.com/repos/zackmdavis/Leafline/events","assignees_url":"https://api.github.com/repos/zackmdavis/Leafline/assignees{/user}","branches_url":"https://api.github.com/repos/zackmdavis/Leafline/branches{/branch}","tags_url":"https://api.github.com/repos/zackmdavis/Leafline/tags","blobs_url":"https://api.github.com/repos/zackmdavis/Leafline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zackmdavis/Leafline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zackmdavis/Leafline/git/refs{/sha}","trees_url":"https://api.github.com/repos/zackmdavis/Leafline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zackmdavis/Leafline/statuses/{sha}","languages_url":"https://api.github.com/repos/zackmdavis/Leafline/languages","stargazers_url":"https://api.github.com/repos/zackmdavis/Leafline/stargazers","contributors_url":"https://api.github.com/repos/zackmdavis/Leafline/contributors","subscribers_url":"https://api.github.com/repos/zackmdavis/Leafline/subscribers","subscription_url":"https://api.github.com/repos/zackmdavis/Leafline/subscription","commits_url":"https://api.github.com/repos/zackmdavis/Leafline/commits{/sha}","git_commits_url":"https://api.github.com/repos/zackmdavis/Leafline/git/commits{/sha}","comments_url":"https://api.github.com/repos/zackmdavis/Leafline/comments{/number}","issue_comment_url":"https://api.github.com/repos/zackmdavis/Leafline/issues/comments{/number}","contents_url":"https://api.github.com/repos/zackmdavis/Leafline/contents/{+path}","compare_url":"https://api.github.com/repos/zackmdavis/Leafline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zackmdavis/Leafline/merges","archive_url":"https://api.github.com/repos/zackmdavis/Leafline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zackmdavis/Leafline/downloads","issues_url":"https://api.github.com/repos/zackmdavis/Leafline/issues{/number}","pulls_url":"https://api.github.com/repos/zackmdavis/Leafline/pulls{/number}","milestones_url":"https://api.github.com/repos/zackmdavis/Leafline/milestones{/number}","notifications_url":"https://api.github.com/repos/zackmdavis/Leafline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zackmdavis/Leafline/labels{/name}","releases_url":"https://api.github.com/repos/zackmdavis/Leafline/releases{/id}","created_at":"2015-08-08T18:58:59Z","updated_at":"2015-09-08T16:23:08Z","pushed_at":"2015-09-14T03:35:06Z","git_url":"git://github.com/zackmdavis/Leafline.git","ssh_url":"git@github.com:zackmdavis/Leafline.git","clone_url":"https://github.com/zackmdavis/Leafline.git","svn_url":"https://github.com/zackmdavis/Leafline","homepage":null,"size":625,"stargazers_count":2,"watchers_count":2,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zackmdavis/Leafline/pulls/9"},"html":{"href":"https://github.com/zackmdavis/Leafline/pull/9"},"issue":{"href":"https://api.github.com/repos/zackmdavis/Leafline/issues/9"},"comments":{"href":"https://api.github.com/repos/zackmdavis/Leafline/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/zackmdavis/Leafline/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/zackmdavis/Leafline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zackmdavis/Leafline/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/zackmdavis/Leafline/statuses/b062759b3915bddb1943a13fc911f75b4b3944ed"}}}}