Skip to main content
Bounty Ended with 100 reputation awarded by user12205
Improve score by a bunch
Source Link
nneonneo
  • 12.4k
  • 8
  • 30
  • 49

Python: 2006 bytes, score=1501

1885 bytes, score=1337

1961 bytes, score=1207

Here's my submission:

import sys
b='eJwdVQuW4ygMvJdyGgwYtAGJQQKHOf2Wp9/rJqGxVaqP+HxUMlGx5F86/XoqsUuonzAz5cf5vqjJ6OlQudxOJR3ibJ8cwuSmsTX12daVht8ubj15miaEH/GrESXrQrXbl1K0m2hs6dRjMkp1PuS2/9JoVslkLmp2L6J6f5kij4s0nkSPni/5GZtixSuKcKd7lYvsfi7yNYxseKXqV6fURkc//KXe+P6Hc071xuZteixiSRtzMnavwNfqcydqSzb+9hMTlW/UQSNe5uRx1EVp1OhA7gXb0v+i0rKN1rYsGlWBufozlFbzP+i2KXCpNKNjfTwkytcBnv+OgoV6blJ/8NDjF6iqUd2ojqcbrScmIaurHJxs6yHjck96brZJwncsIOHhzwyemZurKFrkmpIX9yXSNGsKdF+F+rF2fam0+KAMj3YdoXFJR+nY7AL4y1jaopNuBhk6sl03pSd7x2IxoyeLO6dGedjp9V0inusji0EAyR4pBttN6dt+UR/SYBHCVwuxPZSvqNYpZhPIWXM3Segs30IFXKZKSzqDkcdORud59xVJ8o4WsJQelUqXnIAjV/2whDybo1mDmhYCeAjZV4552gSWOa5aSG3WZ0SaqZVe4Y+o7R+Ps5knum0pDGNxrKA3De3Lwo/si420aemw2g/tdq5sKN1HyltpLNeY/qPUYwsLatc/pwRq5eSwK4l5LhHEnSIZhhG9xsFqeqDMRctmTnVQRoamwUtloiLNrgV+a0uzHBKAyUYl61yD+m++GkgeW1eiuMDEoCR6504z32V9JHD25tPVHFyXOGOc+A2vABogIw9vfxWBatuHwaWggEELdS+8De8z7ZHhir70cLoQpYYDOgfMw+ASbrhnbrwQ27x4TNt/3qHBEPSmwzlagqlH5J4Bk2FBqEvc9fXORUnnnceiMAc2kALwNdOB4W87eAw2uAwsIncpu+IYutsJwsJ/JfusCZNipqyL8uwjNHuDN3MJQBSg/Sr1ppByfD9RWaAt/QhLGDDv2C1PxSvBbfyEFqNO5ZwZpE2yqd2PjEwueV1aJoBdGxNjSl8klx3nuWAAxgCxKePt0bykLrCcQWspM61K3qcNuJYa53VMBWKNJCsrYkzZGfZf49fotx3ZYURvyYQ+GR6iOVCfT6fB4hkehfOws/k3PjFo82ZgaE60TxccO4DqKEKDVXSsuknSmuzZwB8C+h7YBS3oaRPSyGvurfnNvM2bMustIxXMYsM/WdvAvLn8hIx5CMCJQxEM2P2yLuyWYHvZziC+T8IWooeMVWDnvoF6wcETdOUVYBFcFdCop/CJ07RpwyjNy1kslHYwdfNxGYGtX4lWduETDAFIeLJntoAk/sjHlLI5tIwp6mcLF5gxJOR2eugsO5/fey0EhMb72J+mrwyB3rkw2eT0cCPuAOUc5cw/b7mQi8942Eaig4nkYUE9xi3D+FTVRxd80XLL9MXhgISod0JBHxjPPCNirRsh/0TgWdrB/6u01zHbvUnBDc4yhknZxCXgrgSWdv8h1oQR3q8hjdbbE5zK6e4U9nhNkHxCwjCdN26sS9+BIMPe7+EDExPGccPLQYvC8+SY1ioz3AxVUWfdJi3RNjjEMyiWq31CjITE1cQPTO5En39bkFEzri7c2f8Dkow6qw=='.decode('base64').decode('zlib').split(';')
R=raw_input
def G(c):print c;sys.stdout.flush()
def P(w):
 if'END'==w:exit()
 d=b[len(w)].split(':');l=len(d[0]);p=f=0
 while p<l:
  G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r
  if'_'not in x:return
 for c in d[p-l+1]+'zq':
  G(c);x=R();r=w==x;w=x;f+=r
  if'_'not in x or f>5:break
while 1:P(R())

Score output:

score is 1501, totalerr is 21608

It'sThis program is fully deterministic,. The giant blob (which is a base-64-encoded chunk of zlib compressed data) is a list of decision trees (one tree per word length). Each decision tree encodes a complete binary tree with a depth between 2 and pretty well golfed5. How this worksEach internal node is left asa single character, and the decision proceeds based on whether the character is present or not in the hangman word.

Each leaf node of the binary tree contains an exerciseoptimized frequency table specific to that branch of the readertree search. The table is specifically optimized to favor completion of certain words, forwhile completely ignoring others (which it cannot reach due to the time beinglimited "failure" budget). The table isn't optimized to minimize errors, and thus the totalerr count of the program is high despite its (relatively) good score.

The optimizer, which isn't shown, uses a nondeterministic nonlinear optimizer utilizing a randomized gradient descent strategy to produce the frequency tables.

Python: 2006 bytes, score=1501

1885 bytes, score=1337

1961 bytes, score=1207

Here's my submission:

import sys
b='eJwdVQuW4ygMvJdyGgwYtAGJQQKHOf2Wp9/rJqGxVaqP+HxUMlGx5F86/XoqsUuonzAz5cf5vqjJ6OlQudxOJR3ibJ8cwuSmsTX12daVht8ubj15miaEH/GrESXrQrXbl1K0m2hs6dRjMkp1PuS2/9JoVslkLmp2L6J6f5kij4s0nkSPni/5GZtixSuKcKd7lYvsfi7yNYxseKXqV6fURkc//KXe+P6Hc071xuZteixiSRtzMnavwNfqcydqSzb+9hMTlW/UQSNe5uRx1EVp1OhA7gXb0v+i0rKN1rYsGlWBufozlFbzP+i2KXCpNKNjfTwkytcBnv+OgoV6blJ/8NDjF6iqUd2ojqcbrScmIaurHJxs6yHjck96brZJwncsIOHhzwyemZurKFrkmpIX9yXSNGsKdF+F+rF2fam0+KAMj3YdoXFJR+nY7AL4y1jaopNuBhk6sl03pSd7x2IxoyeLO6dGedjp9V0inusji0EAyR4pBttN6dt+UR/SYBHCVwuxPZSvqNYpZhPIWXM3Segs30IFXKZKSzqDkcdORud59xVJ8o4WsJQelUqXnIAjV/2whDybo1mDmhYCeAjZV4552gSWOa5aSG3WZ0SaqZVe4Y+o7R+Ps5knum0pDGNxrKA3De3Lwo/si420aemw2g/tdq5sKN1HyltpLNeY/qPUYwsLatc/pwRq5eSwK4l5LhHEnSIZhhG9xsFqeqDMRctmTnVQRoamwUtloiLNrgV+a0uzHBKAyUYl61yD+m++GkgeW1eiuMDEoCR6504z32V9JHD25tPVHFyXOGOc+A2vABogIw9vfxWBatuHwaWggEELdS+8De8z7ZHhir70cLoQpYYDOgfMw+ASbrhnbrwQ27x4TNt/3qHBEPSmwzlagqlH5J4Bk2FBqEvc9fXORUnnnceiMAc2kALwNdOB4W87eAw2uAwsIncpu+IYutsJwsJ/JfusCZNipqyL8uwjNHuDN3MJQBSg/Sr1ppByfD9RWaAt/QhLGDDv2C1PxSvBbfyEFqNO5ZwZpE2yqd2PjEwueV1aJoBdGxNjSl8klx3nuWAAxgCxKePt0bykLrCcQWspM61K3qcNuJYa53VMBWKNJCsrYkzZGfZf49fotx3ZYURvyYQ+GR6iOVCfT6fB4hkehfOws/k3PjFo82ZgaE60TxccO4DqKEKDVXSsuknSmuzZwB8C+h7YBS3oaRPSyGvurfnNvM2bMustIxXMYsM/WdvAvLn8hIx5CMCJQxEM2P2yLuyWYHvZziC+T8IWooeMVWDnvoF6wcETdOUVYBFcFdCop/CJ07RpwyjNy1kslHYwdfNxGYGtX4lWduETDAFIeLJntoAk/sjHlLI5tIwp6mcLF5gxJOR2eugsO5/fey0EhMb72J+mrwyB3rkw2eT0cCPuAOUc5cw/b7mQi8942Eaig4nkYUE9xi3D+FTVRxd80XLL9MXhgISod0JBHxjPPCNirRsh/0TgWdrB/6u01zHbvUnBDc4yhknZxCXgrgSWdv8h1oQR3q8hjdbbE5zK6e4U9nhNkHxCwjCdN26sS9+BIMPe7+EDExPGccPLQYvC8+SY1ioz3AxVUWfdJi3RNjjEMyiWq31CjITE1cQPTO5En39bkFEzri7c2f8Dkow6qw=='.decode('base64').decode('zlib').split(';')
R=raw_input
def G(c):print c;sys.stdout.flush()
def P(w):
 if'END'==w:exit()
 d=b[len(w)].split(':');l=len(d[0]);p=f=0
 while p<l:
  G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r
  if'_'not in x:return
 for c in d[p-l+1]+'zq':
  G(c);x=R();r=w==x;w=x;f+=r
  if'_'not in x or f>5:break
while 1:P(R())

Score output:

score is 1501, totalerr is 21608

It's fully deterministic, and pretty well golfed. How this works is left as an exercise to the reader, for the time being.

Python: 2006 bytes, score=1501

1885 bytes, score=1337

1961 bytes, score=1207

Here's my submission:

import sys
b='eJwdVQuW4ygMvJdyGgwYtAGJQQKHOf2Wp9/rJqGxVaqP+HxUMlGx5F86/XoqsUuonzAz5cf5vqjJ6OlQudxOJR3ibJ8cwuSmsTX12daVht8ubj15miaEH/GrESXrQrXbl1K0m2hs6dRjMkp1PuS2/9JoVslkLmp2L6J6f5kij4s0nkSPni/5GZtixSuKcKd7lYvsfi7yNYxseKXqV6fURkc//KXe+P6Hc071xuZteixiSRtzMnavwNfqcydqSzb+9hMTlW/UQSNe5uRx1EVp1OhA7gXb0v+i0rKN1rYsGlWBufozlFbzP+i2KXCpNKNjfTwkytcBnv+OgoV6blJ/8NDjF6iqUd2ojqcbrScmIaurHJxs6yHjck96brZJwncsIOHhzwyemZurKFrkmpIX9yXSNGsKdF+F+rF2fam0+KAMj3YdoXFJR+nY7AL4y1jaopNuBhk6sl03pSd7x2IxoyeLO6dGedjp9V0inusji0EAyR4pBttN6dt+UR/SYBHCVwuxPZSvqNYpZhPIWXM3Segs30IFXKZKSzqDkcdORud59xVJ8o4WsJQelUqXnIAjV/2whDybo1mDmhYCeAjZV4552gSWOa5aSG3WZ0SaqZVe4Y+o7R+Ps5knum0pDGNxrKA3De3Lwo/si420aemw2g/tdq5sKN1HyltpLNeY/qPUYwsLatc/pwRq5eSwK4l5LhHEnSIZhhG9xsFqeqDMRctmTnVQRoamwUtloiLNrgV+a0uzHBKAyUYl61yD+m++GkgeW1eiuMDEoCR6504z32V9JHD25tPVHFyXOGOc+A2vABogIw9vfxWBatuHwaWggEELdS+8De8z7ZHhir70cLoQpYYDOgfMw+ASbrhnbrwQ27x4TNt/3qHBEPSmwzlagqlH5J4Bk2FBqEvc9fXORUnnnceiMAc2kALwNdOB4W87eAw2uAwsIncpu+IYutsJwsJ/JfusCZNipqyL8uwjNHuDN3MJQBSg/Sr1ppByfD9RWaAt/QhLGDDv2C1PxSvBbfyEFqNO5ZwZpE2yqd2PjEwueV1aJoBdGxNjSl8klx3nuWAAxgCxKePt0bykLrCcQWspM61K3qcNuJYa53VMBWKNJCsrYkzZGfZf49fotx3ZYURvyYQ+GR6iOVCfT6fB4hkehfOws/k3PjFo82ZgaE60TxccO4DqKEKDVXSsuknSmuzZwB8C+h7YBS3oaRPSyGvurfnNvM2bMustIxXMYsM/WdvAvLn8hIx5CMCJQxEM2P2yLuyWYHvZziC+T8IWooeMVWDnvoF6wcETdOUVYBFcFdCop/CJ07RpwyjNy1kslHYwdfNxGYGtX4lWduETDAFIeLJntoAk/sjHlLI5tIwp6mcLF5gxJOR2eugsO5/fey0EhMb72J+mrwyB3rkw2eT0cCPuAOUc5cw/b7mQi8942Eaig4nkYUE9xi3D+FTVRxd80XLL9MXhgISod0JBHxjPPCNirRsh/0TgWdrB/6u01zHbvUnBDc4yhknZxCXgrgSWdv8h1oQR3q8hjdbbE5zK6e4U9nhNkHxCwjCdN26sS9+BIMPe7+EDExPGccPLQYvC8+SY1ioz3AxVUWfdJi3RNjjEMyiWq31CjITE1cQPTO5En39bkFEzri7c2f8Dkow6qw=='.decode('base64').decode('zlib').split(';')
R=raw_input
def G(c):print c;sys.stdout.flush()
def P(w):
 if'END'==w:exit()
 d=b[len(w)].split(':');l=len(d[0]);p=f=0
 while p<l:
  G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r
  if'_'not in x:return
 for c in d[p-l+1]+'zq':
  G(c);x=R();r=w==x;w=x;f+=r
  if'_'not in x or f>5:break
while 1:P(R())

Score output:

score is 1501, totalerr is 21608

This program is fully deterministic. The giant blob (which is a base-64-encoded chunk of zlib compressed data) is a list of decision trees (one tree per word length). Each decision tree encodes a complete binary tree with a depth between 2 and 5. Each internal node is a single character, and the decision proceeds based on whether the character is present or not in the hangman word.

Each leaf node of the binary tree contains an optimized frequency table specific to that branch of the tree search. The table is specifically optimized to favor completion of certain words, while completely ignoring others (which it cannot reach due to the limited "failure" budget). The table isn't optimized to minimize errors, and thus the totalerr count of the program is high despite its (relatively) good score.

The optimizer, which isn't shown, uses a nondeterministic nonlinear optimizer utilizing a randomized gradient descent strategy to produce the frequency tables.

Improve score by a bunch
Source Link
nneonneo
  • 12.4k
  • 8
  • 30
  • 49

Python: 2006 bytes, score=1501

1885 bytes, score=1337

1961 bytes, score=1207 1885 bytes, score=1337

Here's my submission:

import sys
b='eJxtVW2S6ygMvJd8Gr5hBgSDBAm33yZvXu3+WFclyEYWrVZLfp7OwXhrnDPJ5Fzo95oa73Lai0iUKeLXjn3MDOFod2rVin7cX7E0Ih7yIhf2mzxbR4TbQ+vkN9nkFw1eh16+JlKWQWuoe4Ixs9Tuau066yLytrLSaCxK2oQtxc0Dtp+SqQ7JkzRKtSQlf0cAcuObb='eJwdVQuW4ygMvJdyGgwYtAGJQQKHOf2Wp9/Dj6IsWuIx9fNgH8kAXYeTKVXFU+R83ZtRbROpVcrvH1plSd53OxJ6ckLg9d5DUygmxFwE5VR+6L6it3+01FKoMSn3qxfE9wPRL+pQ3SF7uVSVeWdHCuxDSpLMfzmUZDKVU7dyAplJvYdADdVUmcQVl1ti0q6uMSppC66LAUVLwbHWtuIx4KC7VwldhX2cYRi3H5VSlUYWcHhc6pAkPg5cAH7orJqGxVaqP+HxUMlGx5F86/sF3Hw24mhAPfOXoqsUuonzAz5cf5vqjJ6OlQudxOJR3ibJ8cwuSmsTX12daVht8ubj15miaEH/ilswqyqSWWqEzJDpku5U0t1wtGTec2atXuUUfty5k3BmTXqBgZTxe8FcH4spGrESXrQrXbl1K0m2hs6dRjMkp1PuS2/2L6gp6zE8EPMcnQTlB+bgu8EE4zmPTlJfvPBYgTa4CMYQpffGAcx91TXd3UI2xHjYlaNWpIAFRSFNB7d3u4Mf51ARIy3VusiIV11udKSP74uaSWD2s6cUdENPd9CMVGMXt5iEdE9w8fgsONoA4PMB1RdJhNJpBlh99A51xowpqAqpWBTuIOvswsDPcem1nxMdU59JoVslkLmp2L6J6f5kij4s0nkSPni/rsJYQCtFAnj4O1hZuN8krNAn9hPO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QYvC8+SY1ioz3AxVUWfdJi3RNjjEMyiWq31CjITE1cQPTO5En39bkFEzri7c2f8Dkow6qw=='.decode('base64').decode('zlib').split(';')
R=raw_input
def G(c):print c;sys.stdout.flush()
def P(w):
 if'END'==w:exit()
 d=b[len(w)].split(':');l=len(d[0]);p=f=0
 for i inwhile range(4)p<l:
  G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r
  if'_'not in x:return
 for c in d[p-14]+'zq'l+1]+'zq':
  G(c);x=R();r=w==x;w=x;f+=r
  if'_'not in x or f>5:break
while 1:P(R())

Score output:

score is 13371501, totalerr is 2159721608

It's fully deterministic, and pretty well golfed. How this works is left as an exercise to the reader, for the time being.

Python: 1961 bytes, score=1207 1885 bytes, score=1337

Here's my submission:

import sys
b='eJxtVW2S6ygMvJd8Gr5hBgSDBAm33yZvXu3+WFclyEYWrVZLfp7OwXhrnDPJ5Fzo95oa73Lai0iUKeLXjn3MDOFod2rVin7cX7E0Ih7yIhf2mzxbR4TbQ+vkN9nkFw1eh16+JlKWQWuoe4Ixs9Tuau066yLytrLSaCxK2oQtxc0Dtp+SqQ7JkzRKtSQlf0cAcuOb/Dj6IsWuIx9fNgH8kAXYeTKVXFU+R83ZtRbROpVcrvH1plSd53OxJ6ckLg9d5DUygmxFwE5VR+6L6it3+01FKoMSn3qxfE9wPRL+pQ3SF7uVSVeWdHCuxDSpLMfzmUZDKVU7dyAplJvYdADdVUmcQVl1ti0q6uMSppC66LAUVLwbHWtuIx4KC7VwldhX2cYRi3H5VSlUYWcHhc6pAkPg5cAH7o/sF3Hw24mhAPfO/ilswqyqSWWqEzJDpku5U0t1wtGTec2atXuUUfty5k3BmTXqBgZTxe8FcH4sp/2L6gp6zE8EPMcnQTlB+bgu8EE4zmPTlJfvPBYgTa4CMYQpffGAcx91TXd3UI2xHjYlaNWpIAFRSFNB7d3u4Mf51ARIy3VusiIV11udKSP74uaSWD2s6cUdENPd9CMVGMXt5iEdE9w8fgsONoA4PMB1RdJhNJpBlh99A51xowpqAqpWBTuIOvswsDPcem1nxMdU5/rsJYQCtFAnj4O1hZuN8krNAn9hPOprA6wei5uOk1iLG0nQG4V1tuFdwgmMireEI67ZoEvk0llWPf5T3uVllHRfAdIW65vAFct+r5s0Q63v/EL9Z9E6FvIogIRD6g3EuuU9Hmd61Srgfc5hKpVh0e7C/aPAPoTnypsAcPoADOfWs0wZO7VbwMKz1bNAXOHQN8BNe7GVeskDOMFQWRWArUHu60jYXx/IPhlLXAJkZxoyR1gjc7fXJVdRHl7lC6fdE6A2VOhyc9b+QUo6S2rePA7Cqb0aHi3M2e5OqW0sGz2hzVigy49Oi66LvvrbSAYaApJEHSaHto71QsUAty6fvjFBSjCM7DPEyZgT3QS/fmCie9PY1Z6bg5lr+HTFA/DINlfQoCbwPglUGmTZx2n2/SHNLN8wIAL3aQqC3CIkxOvjqV0GZu8MgGAgGIOtDMGn2K5ijAvrvBs5dINANX4ScGN/zXNLrW4s/26Cptayjks/NtJxRUwcUzecFTrf1rc/qN3YLX2e8srT/+AxMncztjusICzY3n6h6g7S9atEjNGQu+PbPoUdgsZODo23FG26z+NCNas3CLYui1lRurIfM15KEHumcjdyxA0GTCqKMNJ31DVmyxcLxlWsyMfEC+ar/mAWlQS9K5rreuCpR2/QpbXME+UmBlzc0A/41nwoCbndeYI0jxnT70bGQ0HoEJCKtYj1H+Zn6sDzCYu3dnpacN4FdLrxJnb72cHX4RMV3XEPq4DwZ5Glh/x9Fy5/glzf+Gvc2Z2vSf6T7+9L/758EaA08lnl1ijcnWseevAFtrjC7/X3OwyplYyJgi/c7/X8jyuIvhWk/17/AOVAIoY='.decode('base64').decode('zlib').split(';')
R=raw_input
def G(c):print c;sys.stdout.flush()
def P(w):
 if'END'==w:exit()
 d=b[len(w)].split(':');p=f=0
 for i in range(4):
  G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r
  if'_'not in x:return
 for c in d[p-14]+'zq':
  G(c);x=R();r=w==x;w=x;f+=r
  if'_'not in x or f>5:break
while 1:P(R())

Score output:

score is 1337, totalerr is 21597

It's fully deterministic, and pretty well golfed. How this works is left as an exercise to the reader, for the time being.

Python: 2006 bytes, score=1501

1885 bytes, score=1337

1961 bytes, score=1207

Here's my submission:

import sys
b='eJwdVQuW4ygMvJdyGgwYtAGJQQKHOf2Wp9/rJqGxVaqP+HxUMlGx5F86/XoqsUuonzAz5cf5vqjJ6OlQudxOJR3ibJ8cwuSmsTX12daVht8ubj15miaEH/GrESXrQrXbl1K0m2hs6dRjMkp1PuS2/9JoVslkLmp2L6J6f5kij4s0nkSPni/5GZtixSuKcKd7lYvsfi7yNYxseKXqV6fURkc//KXe+P6Hc071xuZteixiSRtzMnavwNfqcydqSzb+9hMTlW/UQSNe5uRx1EVp1OhA7gXb0v+i0rKN1rYsGlWBufozlFbzP+i2KXCpNKNjfTwkytcBnv+OgoV6blJ/8NDjF6iqUd2ojqcbrScmIaurHJxs6yHjck96brZJwncsIOHhzwyemZurKFrkmpIX9yXSNGsKdF+F+rF2fam0+KAMj3YdoXFJR+nY7AL4y1jaopNuBhk6sl03pSd7x2IxoyeLO6dGedjp9V0inusji0EAyR4pBttN6dt+UR/SYBHCVwuxPZSvqNYpZhPIWXM3Segs30IFXKZKSzqDkcdORud59xVJ8o4WsJQelUqXnIAjV/2whDybo1mDmhYCeAjZV4552gSWOa5aSG3WZ0SaqZVe4Y+o7R+Ps5knum0pDGNxrKA3De3Lwo/si420aemw2g/tdq5sKN1HyltpLNeY/qPUYwsLatc/pwRq5eSwK4l5LhHEnSIZhhG9xsFqeqDMRctmTnVQRoamwUtloiLNrgV+a0uzHBKAyUYl61yD+m++GkgeW1eiuMDEoCR6504z32V9JHD25tPVHFyXOGOc+A2vABogIw9vfxWBatuHwaWggEELdS+8De8z7ZHhir70cLoQpYYDOgfMw+ASbrhnbrwQ27x4TNt/3qHBEPSmwzlagqlH5J4Bk2FBqEvc9fXORUnnnceiMAc2kALwNdOB4W87eAw2uAwsIncpu+IYutsJwsJ/JfusCZNipqyL8uwjNHuDN3MJQBSg/Sr1ppByfD9RWaAt/QhLGDDv2C1PxSvBbfyEFqNO5ZwZpE2yqd2PjEwueV1aJoBdGxNjSl8klx3nuWAAxgCxKePt0bykLrCcQWspM61K3qcNuJYa53VMBWKNJCsrYkzZGfZf49fotx3ZYURvyYQ+GR6iOVCfT6fB4hkehfOws/k3PjFo82ZgaE60TxccO4DqKEKDVXSsuknSmuzZwB8C+h7YBS3oaRPSyGvurfnNvM2bMustIxXMYsM/WdvAvLn8hIx5CMCJQxEM2P2yLuyWYHvZziC+T8IWooeMVWDnvoF6wcETdOUVYBFcFdCop/CJ07RpwyjNy1kslHYwdfNxGYGtX4lWduETDAFIeLJntoAk/sjHlLI5tIwp6mcLF5gxJOR2eugsO5/fey0EhMb72J+mrwyB3rkw2eT0cCPuAOUc5cw/b7mQi8942Eaig4nkYUE9xi3D+FTVRxd80XLL9MXhgISod0JBHxjPPCNirRsh/0TgWdrB/6u01zHbvUnBDc4yhknZxCXgrgSWdv8h1oQR3q8hjdbbE5zK6e4U9nhNkHxCwjCdN26sS9+BIMPe7+EDExPGccPLQYvC8+SY1ioz3AxVUWfdJi3RNjjEMyiWq31CjITE1cQPTO5En39bkFEzri7c2f8Dkow6qw=='.decode('base64').decode('zlib').split(';')
R=raw_input
def G(c):print c;sys.stdout.flush()
def P(w):
 if'END'==w:exit()
 d=b[len(w)].split(':');l=len(d[0]);p=f=0
 while p<l:
  G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r
  if'_'not in x:return
 for c in d[p-l+1]+'zq':
  G(c);x=R();r=w==x;w=x;f+=r
  if'_'not in x or f>5:break
while 1:P(R())

Score output:

score is 1501, totalerr is 21608

It's fully deterministic, and pretty well golfed. How this works is left as an exercise to the reader, for the time being.

syntax highlight
Source Link
user12205
  • 9k
  • 3
  • 32
  • 65

Python: 1961 bytes, score=1207 1885 bytes, score=1337

Here's my submission:

import sys
b='eJxtVW2S6ygMvJd8Gr5hBgSDBAm33yZv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IkxOvjqV0GZu8MgGAgGIOtDMGn2K5ijAvrvBs5dINANX4ScGN/zXNLrW4s/26Cptayjks/NtJxRUwcUzecFTrf1rc/qN3YLX2e8srT/+AxMncztjusICzY3n6h6g7S9atEjNGQu+PbPoUdgsZODo23FG26z+NCNas3CLYui1lRurIfM15KEHumcjdyxA0GTCqKMNJ31DVmyxcLxlWsyMfEC+ar/mAWlQS9K5rreuCpR2/QpbXME+UmBlzc0A/41nwoCbndeYI0jxnT70bGQ0HoEJCKtYj1H+Zn6sDzCYu3dnpacN4FdLrxJnb72cHX4RMV3XEPq4DwZ5Glh/x9Fy5/glzf+Gvc2Z2vSf6T7+9L/758EaA08lnl1ijcnWseevAFtrjC7/X3OwyplYyJgi/c7/X8jyuIvhWk/17/AOVAIoY='.decode('base64').decode('zlib').split(';')
R=raw_input
def G(c):print c;sys.stdout.flush()
def P(w):
 if'END'==w:exit()
 d=b[len(w)].split(':');p=f=0
 for i in range(4):
  G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r
  if'_'not in x:return
 for c in d[p-14]+'zq':
  G(c);x=R();r=w==x;w=x;f+=r
  if'_'not in x or f>5:break
while 1:P(R())
import sys
b='eJxtVW2S6ygMvJd8Gr5hBgSDBAm33yZvXu3+WFclyEYWrVZLfp7OwXhrnDPJ5Fzo95oa73Lai0iUKeLXjn3MDOFod2rVin7cX7E0Ih7yIhf2mzxbR4TbQ+vkN9nkFw1eh16+JlKWQWuoe4Ixs9Tuau066yLytrLSaCxK2oQtxc0Dtp+SqQ7JkzRKtSQlf0cAcuOb/Dj6IsWuIx9fNgH8kAXYeTKVXFU+R83ZtRbROpVcrvH1plSd53OxJ6ckLg9d5DUygmxFwE5VR+6L6it3+01FKoMSn3qxfE9wPRL+pQ3SF7uVSVeWdHCuxDSpLMfzmUZDKVU7dyAplJvYdADdVUmcQVl1ti0q6uMSppC66LAUVLwbHWtuIx4KC7VwldhX2cYRi3H5VSlUYWcHhc6pAkPg5cAH7o/sF3Hw24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X8jyuIvhWk/17/AOVAIoY='.decode('base64').decode('zlib').split(';')
R=raw_input
def G(c):print c;sys.stdout.flush()
def P(w):
 if'END'==w:exit()
 d=b[len(w)].split(':');p=f=0
 for i in range(4):
  G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r
  if'_'not in x:return
 for c in d[p-14]+'zq':
  G(c);x=R();r=w==x;w=x;f+=r
  if'_'not in x or f>5:break
while 1:P(R())

Score output:

score is 1337, totalerr is 21597

It's fully deterministic, and pretty well golfed. How this works is left as an exercise to the reader, for the time being.

Python: 1961 bytes, score=1207 1885 bytes, score=1337

Here's my submission:

import sys
b='eJxtVW2S6ygMvJd8Gr5hBgSDBAm33yZvXu3+WFclyEYWrVZLfp7OwXhrnDPJ5Fzo95oa73Lai0iUKeLXjn3MDOFod2rVin7cX7E0Ih7yIhf2mzxbR4TbQ+vkN9nkFw1eh16+JlKWQWuoe4Ixs9Tuau066yLytrLSaCxK2oQtxc0Dtp+SqQ7JkzRKtSQlf0cAcuOb/Dj6IsWuIx9fNgH8kAXYeTKVXFU+R83ZtRbROpVcrvH1plSd53OxJ6ckLg9d5DUygmxFwE5VR+6L6it3+01FKoMSn3qxfE9wPRL+pQ3SF7uVSVeWdHCuxDSpLMfzmUZDKVU7dyAplJvYdADdVUmcQVl1ti0q6uMSppC66LAUVLwbHWtuIx4KC7VwldhX2cYRi3H5VSlUYWcHhc6pAkPg5cAH7o/sF3Hw24mhAPfO/ilswqyqSWWqEzJDpku5U0t1wtGTec2atXuUUfty5k3BmTXqBgZTxe8FcH4sp/2L6gp6zE8EPMcnQTlB+bgu8EE4zmPTlJfvPBYgTa4CMYQpffGAcx91TXd3UI2xHjYlaNWpIAFRSFNB7d3u4Mf51ARIy3VusiIV11udKSP74uaSWD2s6cUdENPd9CMVGMXt5iEdE9w8fgsONoA4PMB1RdJhNJpBlh99A51xowpqAqpWBTuIOvswsDPcem1nxMdU5/rsJYQCtFAnj4O1hZuN8krNAn9hPOprA6wei5uOk1iLG0nQG4V1tuFdwgmMireEI67ZoEvk0llWPf5T3uVllHRfAdIW65vAFct+r5s0Q63v/EL9Z9E6FvIogIRD6g3EuuU9Hmd61Srgfc5hKpVh0e7C/aPAPoTnypsAcPoADOfWs0wZO7VbwMKz1bNAXOHQN8BNe7GVeskDOMFQWRWArUHu60jYXx/IPhlLXAJkZxoyR1gjc7fXJVdRHl7lC6fdE6A2VOhyc9b+QUo6S2rePA7Cqb0aHi3M2e5OqW0sGz2hzVigy49Oi66LvvrbSAYaApJEHSaHto71QsUAty6fvjFBSjCM7DPEyZgT3QS/fmCie9PY1Z6bg5lr+HTFA/DINlfQoCbwPglUGmTZx2n2/SHNLN8wIAL3aQqC3CIkxOvjqV0GZu8MgGAgGIOtDMGn2K5ijAvrvBs5dINANX4ScGN/zXNLrW4s/26Cptayjks/NtJxRUwcUzecFTrf1rc/qN3YLX2e8srT/+AxMncztjusICzY3n6h6g7S9atEjNGQu+PbPoUdgsZODo23FG26z+NCNas3CLYui1lRurIfM15KEHumcjdyxA0GTCqKMNJ31DVmyxcLxlWsyMfEC+ar/mAWlQS9K5rreuCpR2/QpbXME+UmBlzc0A/41nwoCbndeYI0jxnT70bGQ0HoEJCKtYj1H+Zn6sDzCYu3dnpacN4FdLrxJnb72cHX4RMV3XEPq4DwZ5Glh/x9Fy5/glzf+Gvc2Z2vSf6T7+9L/758EaA08lnl1ijcnWseevAFtrjC7/X3OwyplYyJgi/c7/X8jyuIvhWk/17/AOVAIoY='.decode('base64').decode('zlib').split(';')
R=raw_input
def G(c):print c;sys.stdout.flush()
def P(w):
 if'END'==w:exit()
 d=b[len(w)].split(':');p=f=0
 for i in range(4):
  G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r
  if'_'not in x:return
 for c in d[p-14]+'zq':
  G(c);x=R();r=w==x;w=x;f+=r
  if'_'not in x or f>5:break
while 1:P(R())

Score output:

score is 1337, totalerr is 21597

It's fully deterministic, and pretty well golfed. How this works is left as an exercise to the reader, for the time being.

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CM7DPEyZgT3QS/fmCie9PY1Z6bg5lr+HTFA/DINlfQoCbwPglUGmTZx2n2/SHNLN8wIAL3aQqC3CIkxOvjqV0GZu8MgGAgGIOtDMGn2K5ijAvrvBs5dINANX4ScGN/zXNLrW4s/26Cptayjks/NtJxRUwcUzecFTrf1rc/qN3YLX2e8srT/+AxMncztjusICzY3n6h6g7S9atEjNGQu+PbPoUdgsZODo23FG26z+NCNas3CLYui1lRurIfM15KEHumcjdyxA0GTCqKMNJ31DVmyxcLxlWsyMfEC+ar/mAWlQS9K5rreuCpR2/QpbXME+UmBlzc0A/41nwoCbndeYI0jxnT70bGQ0HoEJCKtYj1H+Zn6sDzCYu3dnpacN4FdLrxJnb72cHX4RMV3XEPq4DwZ5Glh/x9Fy5/glzf+Gvc2Z2vSf6T7+9L/758EaA08lnl1ijcnWseevAFtrjC7/X3OwyplYyJgi/c7/X8jyuIvhWk/17/AOVAIoY='.decode('base64').decode('zlib').split(';')
R=raw_input
def G(c):print c;sys.stdout.flush()
def P(w):
 if'END'==w:exit()
 d=b[len(w)].split(':');p=f=0
 for i in range(4):
  G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r
  if'_'not in x:return
 for c in d[p-14]+'zq':
  G(c);x=R();r=w==x;w=x;f+=r
  if'_'not in x or f>5:break
while 1:P(R())

Score output:

score is 1337, totalerr is 21597

It's fully deterministic, and pretty well golfed. How this works is left as an exercise to the reader, for the time being.

Score is now 1337
Source Link
nneonneo
  • 12.4k
  • 8
  • 30
  • 49
Loading
-3 bytes
Source Link
nneonneo
  • 12.4k
  • 8
  • 30
  • 49
Loading
score improved
Source Link
nneonneo
  • 12.4k
  • 8
  • 30
  • 49
Loading
more golfing
Source Link
nneonneo
  • 12.4k
  • 8
  • 30
  • 49
Loading
deleted 4 characters in body
Source Link
nneonneo
  • 12.4k
  • 8
  • 30
  • 49
Loading
Source Link
nneonneo
  • 12.4k
  • 8
  • 30
  • 49
Loading