{"action":"created","comment":{"url":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/comments/154678540","pull_request_review_id":80876099,"id":154678540,"diff_hunk":"@@ -975,3 +975,294 @@ def strategy(self, opponent: Player) -> Action:\n                 self.defect_padding = 0\n \n             return self.try_return(opponent.history[-1])\n+\n+\n+class Harrington(Player):\n+    \"\"\"\n+    Strategy submitted to Axelrod's second tournament by Paul Harringtn (K75R),\n+    and came in eighth in that tournament.\n+\n+    This strategy has three modes:  Normal, and Fair-weather, Defect.\n+\n+    In Normal and Fair-weather modes, the strategy begins by:\n+\n+    - Update history\n+    - Detects random if turn is multiple of 15 and >=30.\n+    - Check if `burned` flag should be raised.\n+    - Check for Fair-weather opponent if turn is 38.\n+\n+    Updating history means to increment the correct cell of the `move_history`.\n+    `move_history` is a matrix where the columns are the opponent's previous\n+    move and rows are indexed by the combo of this player and the opponent's\n+    moves two turns ago*.  [The upper-left cell must be all cooperations, but\n+    otherwise order doesn't matter.]   * If the player is exiting Defect mode,\n+    then the history to determine the row is taken from before the turn that\n+    the player entered Defect mode.  (That is, the turn that started in Normal\n+    mode, but ended in Defect mode.)\n+\n+    If the turn is a multiple of 15 and >=30, then attempt to detect random.\n+    If random is detected, enter Defect mode and defect immediately.  If the\n+    player was previously in Defect mode, then do not re-enter.  The random\n+    detection logic is a modified Pearson's Chi Squared test, with some\n+    additional checks.  [More details in `detect_random` docstrings.]\n+\n+    Some of this player's moves are marked as \"generous.\"  If this player made\n+    a generous move two turns ago and the opponent replied with a Defect, then\n+    raise the `burned` flag.  This will stop certain generous moves later.\n+\n+    The player mostly plays Tit-for-Tat for the first 36 moves, then defects on\n+    the 37th move.  If the opponent cooperates on the first 36 moves, and\n+    defects on the 37th move also, then enter Fair-weather mode and cooperate\n+    this turn.\n+\n+    Next in Normal Mode:\n+\n+    1. Check for defect and parity streaks.\n+    2. Check if cooperations are scheduled.\n+    3. Otherwise,\n+       - If turn < 37, Tit-for-Tat.","path":"axelrod/strategies/axelrod_second.py","position":49,"original_position":49,"commit_id":"d902e4189a84010e68cf751997722f06f2120391","original_commit_id":"d902e4189a84010e68cf751997722f06f2120391","user":{"login":"drvinceknight","id":2131546,"avatar_url":"https://avatars2.githubusercontent.com/u/2131546?v=4","gravatar_id":"","url":"https://api.github.com/users/drvinceknight","html_url":"https://github.com/drvinceknight","followers_url":"https://api.github.com/users/drvinceknight/followers","following_url":"https://api.github.com/users/drvinceknight/following{/other_user}","gists_url":"https://api.github.com/users/drvinceknight/gists{/gist_id}","starred_url":"https://api.github.com/users/drvinceknight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drvinceknight/subscriptions","organizations_url":"https://api.github.com/users/drvinceknight/orgs","repos_url":"https://api.github.com/users/drvinceknight/repos","events_url":"https://api.github.com/users/drvinceknight/events{/privacy}","received_events_url":"https://api.github.com/users/drvinceknight/received_events","type":"User","site_admin":false},"body":"Need a blank line here (this is what's failing on the CI):\r\n\r\n```\r\n    3. Otherwise,\r\n        \r\n       - If turn ...\r\n```","created_at":"2017-12-04T15:23:15Z","updated_at":"2017-12-04T15:49:29Z","html_url":"https://github.com/Axelrod-Python/Axelrod/pull/1146#discussion_r154678540","pull_request_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/1146","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/comments/154678540"},"html":{"href":"https://github.com/Axelrod-Python/Axelrod/pull/1146#discussion_r154678540"},"pull_request":{"href":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/1146"}}},"pull_request":{"url":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/1146","id":156202862,"html_url":"https://github.com/Axelrod-Python/Axelrod/pull/1146","diff_url":"https://github.com/Axelrod-Python/Axelrod/pull/1146.diff","patch_url":"https://github.com/Axelrod-Python/Axelrod/pull/1146.patch","issue_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/issues/1146","number":1146,"state":"open","locked":false,"title":"Implemented Harrington (k75r from Axelrod's Second)","user":{"login":"gaffney2010","id":5215426,"avatar_url":"https://avatars3.githubusercontent.com/u/5215426?v=4","gravatar_id":"","url":"https://api.github.com/users/gaffney2010","html_url":"https://github.com/gaffney2010","followers_url":"https://api.github.com/users/gaffney2010/followers","following_url":"https://api.github.com/users/gaffney2010/following{/other_user}","gists_url":"https://api.github.com/users/gaffney2010/gists{/gist_id}","starred_url":"https://api.github.com/users/gaffney2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaffney2010/subscriptions","organizations_url":"https://api.github.com/users/gaffney2010/orgs","repos_url":"https://api.github.com/users/gaffney2010/repos","events_url":"https://api.github.com/users/gaffney2010/events{/privacy}","received_events_url":"https://api.github.com/users/gaffney2010/received_events","type":"User","site_admin":false},"body":"Below are the fingerprints for the basic strategies, the random, and against the six custom strategies that I used in the test file.\r\n\r\nI've also attached a PDF that bridges the gap from the Fortran to what I have, along with some small amount of commentary on the code.\r\n\r\n[HarringtonNotes.pdf](https://github.com/Axelrod-Python/Axelrod/files/1527303/HarringtonNotes.pdf)\r\n\r\n![additional_fortran](https://user-images.githubusercontent.com/5215426/33556068-b825422a-d8d0-11e7-87d6-a081172781ad.png)\r\n![additional_python](https://user-images.githubusercontent.com/5215426/33556069-b8612344-d8d0-11e7-8273-79b9ea66a123.png)\r\n![basic_fortran](https://user-images.githubusercontent.com/5215426/33556070-b881acd6-d8d0-11e7-894d-a95306e43080.png)\r\n![basic_python](https://user-images.githubusercontent.com/5215426/33556071-b899c0aa-d8d0-11e7-8a1c-74d425f250bd.png)\r\n![prob_fortran](https://user-images.githubusercontent.com/5215426/33556072-b8b7fc6e-d8d0-11e7-9873-538d249c3560.png)\r\n![prob_python](https://user-images.githubusercontent.com/5215426/33556074-b8d1ae8e-d8d0-11e7-98f6-708512e8eec9.png)\r\n","created_at":"2017-12-04T13:56:36Z","updated_at":"2017-12-04T15:49:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6146c8274078f03f2fa105ef04196eabafe114d3","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/1146/commits","review_comments_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/1146/comments","review_comment_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/issues/1146/comments","statuses_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/statuses/d902e4189a84010e68cf751997722f06f2120391","head":{"label":"gaffney2010:master","ref":"master","sha":"d902e4189a84010e68cf751997722f06f2120391","user":{"login":"gaffney2010","id":5215426,"avatar_url":"https://avatars3.githubusercontent.com/u/5215426?v=4","gravatar_id":"","url":"https://api.github.com/users/gaffney2010","html_url":"https://github.com/gaffney2010","followers_url":"https://api.github.com/users/gaffney2010/followers","following_url":"https://api.github.com/users/gaffney2010/following{/other_user}","gists_url":"https://api.github.com/users/gaffney2010/gists{/gist_id}","starred_url":"https://api.github.com/users/gaffney2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaffney2010/subscriptions","organizations_url":"https://api.github.com/users/gaffney2010/orgs","repos_url":"https://api.github.com/users/gaffney2010/repos","events_url":"https://api.github.com/users/gaffney2010/events{/privacy}","received_events_url":"https://api.github.com/users/gaffney2010/received_events","type":"User","site_admin":false},"repo":{"id":111237204,"name":"Axelrod","full_name":"gaffney2010/Axelrod","owner":{"login":"gaffney2010","id":5215426,"avatar_url":"https://avatars3.githubusercontent.com/u/5215426?v=4","gravatar_id":"","url":"https://api.github.com/users/gaffney2010","html_url":"https://github.com/gaffney2010","followers_url":"https://api.github.com/users/gaffney2010/followers","following_url":"https://api.github.com/users/gaffney2010/following{/other_user}","gists_url":"https://api.github.com/users/gaffney2010/gists{/gist_id}","starred_url":"https://api.github.com/users/gaffney2010/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaffney2010/subscriptions","organizations_url":"https://api.github.com/users/gaffney2010/orgs","repos_url":"https://api.github.com/users/gaffney2010/repos","events_url":"https://api.github.com/users/gaffney2010/events{/privacy}","received_events_url":"https://api.github.com/users/gaffney2010/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gaffney2010/Axelrod","description":"A research tool for the Iterated Prisoner's Dilemma","fork":true,"url":"https://api.github.com/repos/gaffney2010/Axelrod","forks_url":"https://api.github.com/repos/gaffney2010/Axelrod/forks","keys_url":"https://api.github.com/repos/gaffney2010/Axelrod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gaffney2010/Axelrod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gaffney2010/Axelrod/teams","hooks_url":"https://api.github.com/repos/gaffney2010/Axelrod/hooks","issue_events_url":"https://api.github.com/repos/gaffney2010/Axelrod/issues/events{/number}","events_url":"https://api.github.com/repos/gaffney2010/Axelrod/events","assignees_url":"https://api.github.com/repos/gaffney2010/Axelrod/assignees{/user}","branches_url":"https://api.github.com/repos/gaffney2010/Axelrod/branches{/branch}","tags_url":"https://api.github.com/repos/gaffney2010/Axelrod/tags","blobs_url":"https://api.github.com/repos/gaffney2010/Axelrod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gaffney2010/Axelrod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gaffney2010/Axelrod/git/refs{/sha}","trees_url":"https://api.github.com/repos/gaffney2010/Axelrod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gaffney2010/Axelrod/statuses/{sha}","languages_url":"https://api.github.com/repos/gaffney2010/Axelrod/languages","stargazers_url":"https://api.github.com/repos/gaffney2010/Axelrod/stargazers","contributors_url":"https://api.github.com/repos/gaffney2010/Axelrod/contributors","subscribers_url":"https://api.github.com/repos/gaffney2010/Axelrod/subscribers","subscription_url":"https://api.github.com/repos/gaffney2010/Axelrod/subscription","commits_url":"https://api.github.com/repos/gaffney2010/Axelrod/commits{/sha}","git_commits_url":"https://api.github.com/repos/gaffney2010/Axelrod/git/commits{/sha}","comments_url":"https://api.github.com/repos/gaffney2010/Axelrod/comments{/number}","issue_comment_url":"https://api.github.com/repos/gaffney2010/Axelrod/issues/comments{/number}","contents_url":"https://api.github.com/repos/gaffney2010/Axelrod/contents/{+path}","compare_url":"https://api.github.com/repos/gaffney2010/Axelrod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gaffney2010/Axelrod/merges","archive_url":"https://api.github.com/repos/gaffney2010/Axelrod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gaffney2010/Axelrod/downloads","issues_url":"https://api.github.com/repos/gaffney2010/Axelrod/issues{/number}","pulls_url":"https://api.github.com/repos/gaffney2010/Axelrod/pulls{/number}","milestones_url":"https://api.github.com/repos/gaffney2010/Axelrod/milestones{/number}","notifications_url":"https://api.github.com/repos/gaffney2010/Axelrod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gaffney2010/Axelrod/labels{/name}","releases_url":"https://api.github.com/repos/gaffney2010/Axelrod/releases{/id}","deployments_url":"https://api.github.com/repos/gaffney2010/Axelrod/deployments","created_at":"2017-11-18T20:33:03Z","updated_at":"2017-11-18T20:33:05Z","pushed_at":"2017-12-04T13:53:22Z","git_url":"git://github.com/gaffney2010/Axelrod.git","ssh_url":"git@github.com:gaffney2010/Axelrod.git","clone_url":"https://github.com/gaffney2010/Axelrod.git","svn_url":"https://github.com/gaffney2010/Axelrod","homepage":"http://axelrod.readthedocs.org/","size":6864,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Axelrod-Python:master","ref":"master","sha":"be2c4b06892f0fa5987413e85a9638e6914790da","user":{"login":"Axelrod-Python","id":11720937,"avatar_url":"https://avatars1.githubusercontent.com/u/11720937?v=4","gravatar_id":"","url":"https://api.github.com/users/Axelrod-Python","html_url":"https://github.com/Axelrod-Python","followers_url":"https://api.github.com/users/Axelrod-Python/followers","following_url":"https://api.github.com/users/Axelrod-Python/following{/other_user}","gists_url":"https://api.github.com/users/Axelrod-Python/gists{/gist_id}","starred_url":"https://api.github.com/users/Axelrod-Python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Axelrod-Python/subscriptions","organizations_url":"https://api.github.com/users/Axelrod-Python/orgs","repos_url":"https://api.github.com/users/Axelrod-Python/repos","events_url":"https://api.github.com/users/Axelrod-Python/events{/privacy}","received_events_url":"https://api.github.com/users/Axelrod-Python/received_events","type":"Organization","site_admin":false},"repo":{"id":30959449,"name":"Axelrod","full_name":"Axelrod-Python/Axelrod","owner":{"login":"Axelrod-Python","id":11720937,"avatar_url":"https://avatars1.githubusercontent.com/u/11720937?v=4","gravatar_id":"","url":"https://api.github.com/users/Axelrod-Python","html_url":"https://github.com/Axelrod-Python","followers_url":"https://api.github.com/users/Axelrod-Python/followers","following_url":"https://api.github.com/users/Axelrod-Python/following{/other_user}","gists_url":"https://api.github.com/users/Axelrod-Python/gists{/gist_id}","starred_url":"https://api.github.com/users/Axelrod-Python/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Axelrod-Python/subscriptions","organizations_url":"https://api.github.com/users/Axelrod-Python/orgs","repos_url":"https://api.github.com/users/Axelrod-Python/repos","events_url":"https://api.github.com/users/Axelrod-Python/events{/privacy}","received_events_url":"https://api.github.com/users/Axelrod-Python/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Axelrod-Python/Axelrod","description":"A research tool for the Iterated Prisoner's Dilemma","fork":false,"url":"https://api.github.com/repos/Axelrod-Python/Axelrod","forks_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/forks","keys_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/teams","hooks_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/hooks","issue_events_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/issues/events{/number}","events_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/events","assignees_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/assignees{/user}","branches_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/branches{/branch}","tags_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/tags","blobs_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/git/refs{/sha}","trees_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/statuses/{sha}","languages_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/languages","stargazers_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/stargazers","contributors_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/contributors","subscribers_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/subscribers","subscription_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/subscription","commits_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/commits{/sha}","git_commits_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/git/commits{/sha}","comments_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/comments{/number}","issue_comment_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/issues/comments{/number}","contents_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/contents/{+path}","compare_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/merges","archive_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/downloads","issues_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/issues{/number}","pulls_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls{/number}","milestones_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/milestones{/number}","notifications_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/labels{/name}","releases_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/releases{/id}","deployments_url":"https://api.github.com/repos/Axelrod-Python/Axelrod/deployments","created_at":"2015-02-18T09:37:17Z","updated_at":"2017-11-28T10:46:45Z","pushed_at":"2017-12-04T14:39:50Z","git_url":"git://github.com/Axelrod-Python/Axelrod.git","ssh_url":"git@github.com:Axelrod-Python/Axelrod.git","clone_url":"https://github.com/Axelrod-Python/Axelrod.git","svn_url":"https://github.com/Axelrod-Python/Axelrod","homepage":"http://axelrod.readthedocs.org/","size":6845,"stargazers_count":268,"watchers_count":268,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":115,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":115,"open_issues":29,"watchers":268,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/1146"},"html":{"href":"https://github.com/Axelrod-Python/Axelrod/pull/1146"},"issue":{"href":"https://api.github.com/repos/Axelrod-Python/Axelrod/issues/1146"},"comments":{"href":"https://api.github.com/repos/Axelrod-Python/Axelrod/issues/1146/comments"},"review_comments":{"href":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/1146/comments"},"review_comment":{"href":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Axelrod-Python/Axelrod/pulls/1146/commits"},"statuses":{"href":"https://api.github.com/repos/Axelrod-Python/Axelrod/statuses/d902e4189a84010e68cf751997722f06f2120391"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"drvinceknight"}}