{"action":"closed","number":12,"pull_request":{"url":"https://api.github.com/repos/pasky/pachi/pulls/12","id":55596173,"html_url":"https://github.com/pasky/pachi/pull/12","diff_url":"https://github.com/pasky/pachi/pull/12.diff","patch_url":"https://github.com/pasky/pachi/pull/12.patch","issue_url":"https://api.github.com/repos/pasky/pachi/issues/12","number":12,"state":"closed","locked":false,"title":"is_bad_selfatari() fixes !","user":{"login":"lemonsqueeze","id":2463904,"avatar_url":"https://avatars.githubusercontent.com/u/2463904?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonsqueeze","html_url":"https://github.com/lemonsqueeze","followers_url":"https://api.github.com/users/lemonsqueeze/followers","following_url":"https://api.github.com/users/lemonsqueeze/following{/other_user}","gists_url":"https://api.github.com/users/lemonsqueeze/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonsqueeze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonsqueeze/subscriptions","organizations_url":"https://api.github.com/users/lemonsqueeze/orgs","repos_url":"https://api.github.com/users/lemonsqueeze/repos","events_url":"https://api.github.com/users/lemonsqueeze/events{/privacy}","received_events_url":"https://api.github.com/users/lemonsqueeze/received_events","type":"User","site_admin":false},"body":"Hi,\r\n\r\nFollowing up on the life & death issue in moggy I thought I'd post\r\nthe result of my is_bad_selfatari() hacks.\r\n\r\nSo, initial motivation was to try and help with these situations:\r\n\r\n    O X X * . O\r\n    O O O O O O\r\n\r\nCurrent is_bad_selfatari() logic says * is bad move unless white has no\r\noutside libs, so the idea was to allow playing nakade first when created\r\nshape is dead.\r\n\r\nI came up with nakade_making_dead_shape() to decide the shapes. It's\r\naccurate but expensive so I thought that was going to be slow, but turns\r\nout when combined with the existing checks it's about as fast as before. I\r\nguess it gets called rarely enough that it doesn't make a difference (!)\r\n\r\nI ended up going through many of the code paths in\r\nsetup_nakade_or_snapback() and found a few issues as well. In one of them\r\nit didn't check if it's possible to connect out instead, and that seems to\r\nhave contributed a fair amount of strange self-atariing in moggy. Looks\r\nlike it tended to make pachi squeeze oponent's stones into strange (but\r\nsafe !) shapes thinking there's a good chance he'll self-atari them =)\r\nMaybe b center group in this one is a good example:\r\n  http://files.gokgs.com/games/2015/12/22/pachipachi-fakioba.sgf\r\n\r\nNumber of unit tests in sar.t almost doubled, indeed many of the new ones\r\nare just outside libs versions of the previous ones to test the new code\r\npaths. Came across a 'forbidden throw-in to get seki' case that both\r\ncurrent & old code fail to address but that'll be for another day. In the\r\nmeantime comparing unit tests results across previous version is pretty\r\nrewarding =)\r\n\r\nI tentatively put moggy selfatarirate back to 95 although I don't know\r\nwhat's the best value now. I doubt new code is perfect, but it should be\r\nable to cope with something > 60. Will report impact on strength once I\r\nfigure out how to run automated playing tests. At any rate judging from\r\nwhat pachi's doing on kgs atm it doesn't seem catastrophic ;)\r\n","created_at":"2016-01-11T08:30:51Z","updated_at":"2016-02-01T16:45:37Z","closed_at":"2016-02-01T16:45:36Z","merged_at":"2016-02-01T16:45:36Z","merge_commit_sha":"ea62e65b5a9a5e9dd4b2721997155f8f6ccebef0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pasky/pachi/pulls/12/commits","review_comments_url":"https://api.github.com/repos/pasky/pachi/pulls/12/comments","review_comment_url":"https://api.github.com/repos/pasky/pachi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pasky/pachi/issues/12/comments","statuses_url":"https://api.github.com/repos/pasky/pachi/statuses/8e6758ebfe02a007c39bc70474019f702012ee0f","head":{"label":"lemonsqueeze:is_bad_selfatari","ref":"is_bad_selfatari","sha":"8e6758ebfe02a007c39bc70474019f702012ee0f","user":{"login":"lemonsqueeze","id":2463904,"avatar_url":"https://avatars.githubusercontent.com/u/2463904?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonsqueeze","html_url":"https://github.com/lemonsqueeze","followers_url":"https://api.github.com/users/lemonsqueeze/followers","following_url":"https://api.github.com/users/lemonsqueeze/following{/other_user}","gists_url":"https://api.github.com/users/lemonsqueeze/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonsqueeze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonsqueeze/subscriptions","organizations_url":"https://api.github.com/users/lemonsqueeze/orgs","repos_url":"https://api.github.com/users/lemonsqueeze/repos","events_url":"https://api.github.com/users/lemonsqueeze/events{/privacy}","received_events_url":"https://api.github.com/users/lemonsqueeze/received_events","type":"User","site_admin":false},"repo":{"id":49410283,"name":"pachi","full_name":"lemonsqueeze/pachi","owner":{"login":"lemonsqueeze","id":2463904,"avatar_url":"https://avatars.githubusercontent.com/u/2463904?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonsqueeze","html_url":"https://github.com/lemonsqueeze","followers_url":"https://api.github.com/users/lemonsqueeze/followers","following_url":"https://api.github.com/users/lemonsqueeze/following{/other_user}","gists_url":"https://api.github.com/users/lemonsqueeze/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonsqueeze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonsqueeze/subscriptions","organizations_url":"https://api.github.com/users/lemonsqueeze/orgs","repos_url":"https://api.github.com/users/lemonsqueeze/repos","events_url":"https://api.github.com/users/lemonsqueeze/events{/privacy}","received_events_url":"https://api.github.com/users/lemonsqueeze/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lemonsqueeze/pachi","description":"A fairly strong Go/Baduk/Weiqi playing program","fork":true,"url":"https://api.github.com/repos/lemonsqueeze/pachi","forks_url":"https://api.github.com/repos/lemonsqueeze/pachi/forks","keys_url":"https://api.github.com/repos/lemonsqueeze/pachi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lemonsqueeze/pachi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lemonsqueeze/pachi/teams","hooks_url":"https://api.github.com/repos/lemonsqueeze/pachi/hooks","issue_events_url":"https://api.github.com/repos/lemonsqueeze/pachi/issues/events{/number}","events_url":"https://api.github.com/repos/lemonsqueeze/pachi/events","assignees_url":"https://api.github.com/repos/lemonsqueeze/pachi/assignees{/user}","branches_url":"https://api.github.com/repos/lemonsqueeze/pachi/branches{/branch}","tags_url":"https://api.github.com/repos/lemonsqueeze/pachi/tags","blobs_url":"https://api.github.com/repos/lemonsqueeze/pachi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lemonsqueeze/pachi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lemonsqueeze/pachi/git/refs{/sha}","trees_url":"https://api.github.com/repos/lemonsqueeze/pachi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lemonsqueeze/pachi/statuses/{sha}","languages_url":"https://api.github.com/repos/lemonsqueeze/pachi/languages","stargazers_url":"https://api.github.com/repos/lemonsqueeze/pachi/stargazers","contributors_url":"https://api.github.com/repos/lemonsqueeze/pachi/contributors","subscribers_url":"https://api.github.com/repos/lemonsqueeze/pachi/subscribers","subscription_url":"https://api.github.com/repos/lemonsqueeze/pachi/subscription","commits_url":"https://api.github.com/repos/lemonsqueeze/pachi/commits{/sha}","git_commits_url":"https://api.github.com/repos/lemonsqueeze/pachi/git/commits{/sha}","comments_url":"https://api.github.com/repos/lemonsqueeze/pachi/comments{/number}","issue_comment_url":"https://api.github.com/repos/lemonsqueeze/pachi/issues/comments{/number}","contents_url":"https://api.github.com/repos/lemonsqueeze/pachi/contents/{+path}","compare_url":"https://api.github.com/repos/lemonsqueeze/pachi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lemonsqueeze/pachi/merges","archive_url":"https://api.github.com/repos/lemonsqueeze/pachi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lemonsqueeze/pachi/downloads","issues_url":"https://api.github.com/repos/lemonsqueeze/pachi/issues{/number}","pulls_url":"https://api.github.com/repos/lemonsqueeze/pachi/pulls{/number}","milestones_url":"https://api.github.com/repos/lemonsqueeze/pachi/milestones{/number}","notifications_url":"https://api.github.com/repos/lemonsqueeze/pachi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lemonsqueeze/pachi/labels{/name}","releases_url":"https://api.github.com/repos/lemonsqueeze/pachi/releases{/id}","deployments_url":"https://api.github.com/repos/lemonsqueeze/pachi/deployments","created_at":"2016-01-11T07:44:57Z","updated_at":"2016-01-11T07:44:58Z","pushed_at":"2016-02-01T14:36:20Z","git_url":"git://github.com/lemonsqueeze/pachi.git","ssh_url":"git@github.com:lemonsqueeze/pachi.git","clone_url":"https://github.com/lemonsqueeze/pachi.git","svn_url":"https://github.com/lemonsqueeze/pachi","homepage":"http://pachi.or.cz/","size":12124,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pasky:master","ref":"master","sha":"a8e492c7e387fb1443881ca4a695eaabeefd706b","user":{"login":"pasky","id":18439,"avatar_url":"https://avatars.githubusercontent.com/u/18439?v=3","gravatar_id":"","url":"https://api.github.com/users/pasky","html_url":"https://github.com/pasky","followers_url":"https://api.github.com/users/pasky/followers","following_url":"https://api.github.com/users/pasky/following{/other_user}","gists_url":"https://api.github.com/users/pasky/gists{/gist_id}","starred_url":"https://api.github.com/users/pasky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pasky/subscriptions","organizations_url":"https://api.github.com/users/pasky/orgs","repos_url":"https://api.github.com/users/pasky/repos","events_url":"https://api.github.com/users/pasky/events{/privacy}","received_events_url":"https://api.github.com/users/pasky/received_events","type":"User","site_admin":false},"repo":{"id":14397180,"name":"pachi","full_name":"pasky/pachi","owner":{"login":"pasky","id":18439,"avatar_url":"https://avatars.githubusercontent.com/u/18439?v=3","gravatar_id":"","url":"https://api.github.com/users/pasky","html_url":"https://github.com/pasky","followers_url":"https://api.github.com/users/pasky/followers","following_url":"https://api.github.com/users/pasky/following{/other_user}","gists_url":"https://api.github.com/users/pasky/gists{/gist_id}","starred_url":"https://api.github.com/users/pasky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pasky/subscriptions","organizations_url":"https://api.github.com/users/pasky/orgs","repos_url":"https://api.github.com/users/pasky/repos","events_url":"https://api.github.com/users/pasky/events{/privacy}","received_events_url":"https://api.github.com/users/pasky/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pasky/pachi","description":"A fairly strong Go/Baduk/Weiqi playing program","fork":false,"url":"https://api.github.com/repos/pasky/pachi","forks_url":"https://api.github.com/repos/pasky/pachi/forks","keys_url":"https://api.github.com/repos/pasky/pachi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pasky/pachi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pasky/pachi/teams","hooks_url":"https://api.github.com/repos/pasky/pachi/hooks","issue_events_url":"https://api.github.com/repos/pasky/pachi/issues/events{/number}","events_url":"https://api.github.com/repos/pasky/pachi/events","assignees_url":"https://api.github.com/repos/pasky/pachi/assignees{/user}","branches_url":"https://api.github.com/repos/pasky/pachi/branches{/branch}","tags_url":"https://api.github.com/repos/pasky/pachi/tags","blobs_url":"https://api.github.com/repos/pasky/pachi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pasky/pachi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pasky/pachi/git/refs{/sha}","trees_url":"https://api.github.com/repos/pasky/pachi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pasky/pachi/statuses/{sha}","languages_url":"https://api.github.com/repos/pasky/pachi/languages","stargazers_url":"https://api.github.com/repos/pasky/pachi/stargazers","contributors_url":"https://api.github.com/repos/pasky/pachi/contributors","subscribers_url":"https://api.github.com/repos/pasky/pachi/subscribers","subscription_url":"https://api.github.com/repos/pasky/pachi/subscription","commits_url":"https://api.github.com/repos/pasky/pachi/commits{/sha}","git_commits_url":"https://api.github.com/repos/pasky/pachi/git/commits{/sha}","comments_url":"https://api.github.com/repos/pasky/pachi/comments{/number}","issue_comment_url":"https://api.github.com/repos/pasky/pachi/issues/comments{/number}","contents_url":"https://api.github.com/repos/pasky/pachi/contents/{+path}","compare_url":"https://api.github.com/repos/pasky/pachi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pasky/pachi/merges","archive_url":"https://api.github.com/repos/pasky/pachi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pasky/pachi/downloads","issues_url":"https://api.github.com/repos/pasky/pachi/issues{/number}","pulls_url":"https://api.github.com/repos/pasky/pachi/pulls{/number}","milestones_url":"https://api.github.com/repos/pasky/pachi/milestones{/number}","notifications_url":"https://api.github.com/repos/pasky/pachi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pasky/pachi/labels{/name}","releases_url":"https://api.github.com/repos/pasky/pachi/releases{/id}","deployments_url":"https://api.github.com/repos/pasky/pachi/deployments","created_at":"2013-11-14T14:26:07Z","updated_at":"2016-02-01T09:29:57Z","pushed_at":"2016-02-01T16:45:36Z","git_url":"git://github.com/pasky/pachi.git","ssh_url":"git@github.com:pasky/pachi.git","clone_url":"https://github.com/pasky/pachi.git","svn_url":"https://github.com/pasky/pachi","homepage":"http://pachi.or.cz/","size":13326,"stargazers_count":58,"watchers_count":58,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":6,"forks":21,"open_issues":6,"watchers":58,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pasky/pachi/pulls/12"},"html":{"href":"https://github.com/pasky/pachi/pull/12"},"issue":{"href":"https://api.github.com/repos/pasky/pachi/issues/12"},"comments":{"href":"https://api.github.com/repos/pasky/pachi/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/pasky/pachi/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/pasky/pachi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pasky/pachi/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/pasky/pachi/statuses/8e6758ebfe02a007c39bc70474019f702012ee0f"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"pasky","id":18439,"avatar_url":"https://avatars.githubusercontent.com/u/18439?v=3","gravatar_id":"","url":"https://api.github.com/users/pasky","html_url":"https://github.com/pasky","followers_url":"https://api.github.com/users/pasky/followers","following_url":"https://api.github.com/users/pasky/following{/other_user}","gists_url":"https://api.github.com/users/pasky/gists{/gist_id}","starred_url":"https://api.github.com/users/pasky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pasky/subscriptions","organizations_url":"https://api.github.com/users/pasky/orgs","repos_url":"https://api.github.com/users/pasky/repos","events_url":"https://api.github.com/users/pasky/events{/privacy}","received_events_url":"https://api.github.com/users/pasky/received_events","type":"User","site_admin":false},"comments":13,"review_comments":0,"commits":2,"additions":731,"deletions":117,"changed_files":4}}