diff --git a/calculateAndSubmit b/calculateAndSubmit index f046317..7479c95 100755 --- a/calculateAndSubmit +++ b/calculateAndSubmit @@ -3,7 +3,7 @@ if [ $# -lt 1 ]; then echo "missing json filename" exit 1 fi -OUTPUT=`dist/build/icfp2015/icfp2015 -f $1|./filterResults.py` +OUTPUT=`dist/build/icfp2015/icfp2015 -f $1|./filterResults.py|sed -e 's/ //g'` if [ $? -eq 0 ]; then read -p "Are you sure? [y/n]" -n 1 -r echo @@ -12,6 +12,7 @@ if [ $? -eq 0 ]; then if [ "$response" == "created" ]; then echo "submitted" else + echo $response echo "error with server" fi else diff --git a/filterResults.py b/filterResults.py index f451002..373b214 100755 --- a/filterResults.py +++ b/filterResults.py @@ -50,18 +50,18 @@ else: import subprocess process = subprocess.Popen(['curl --user :2aaFCkjNIDHAsAIh9iQHc+Y+FGhkM5Z0RQgpO6TL6EA= -X GET https://davar.icfpcontest.org/teams/235/solutions'], shell = True, stdout=subprocess.PIPE) out, err = process.communicate() - print 666 if err == None: + print "Results:" serverResults = {} results = json.loads(out) for result in results: #2015-08-08T12:26:42.894Z date_object = datetime.strptime(result['createdAt'], '%Y-%m-%dT%H:%M:%S.%fZ') - print str(date_object) +# print str(date_object) key = str(result['problemId'])+"."+str(result['seed']) if not key in serverResults or serverResults[key]['createdAt'] < result['createdAt']: serverResults[key] = result - print serverResults +# print serverResults for solutionToSend in solutionsToSend: key = str(solutionToSend['problemId'])+"."+str(solutionToSend['seed']) if not key in serverResults: @@ -69,12 +69,14 @@ else: else: if solutionToSend['solution'] != serverResults[key]['solution']: print str(solutionToSend['problemId'])+" "+str(solutionToSend['seed']) + " solution differ: " + solutionToSend['solution'] + " != " + serverResults[key]['solution'] + " (server)" + elif serverResults[key]['score'] == None: + print str(solutionToSend['problemId'])+" "+str(solutionToSend['seed']) + " solution evaluation pending" elif scores[key] != serverResults[key]['score']: - print str(solutionToSend['problemId'])+" "+str(solutionToSend['seed']) + " score differ: " + scores[key] + " != " + serverResults[key]['score'] + " (server)" - print scores - print type(out) - print json.dumps(serverResults) - print len(serverResults) + print str(solutionToSend['problemId'])+" "+str(solutionToSend['seed']) + " score differ: " + str(scores[key]) + " != " + str(serverResults[key]['score']) + " (server)" +# print scores +# print type(out) +# print json.dumps(serverResults) +# print len(serverResults) else: print "error retriving results from server" sys.exit(1) diff --git a/solutions/2.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100 b/solutions/2.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100 new file mode 100644 index 0000000..d82de6e --- /dev/null +++ b/solutions/2.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100 @@ -0,0 +1 @@ +{"seed": 0, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaalalalalalalalaaaaaaaaaaaalalalalalalaaaaaaaaaaaaalalalalaaaaaaaaaalalalalaaaaaaaaaaaalaaaaaaaaaalaaaaaaallaaaaaaalaaallaalaaaalaalaaalllaalalaaallaaaaaaalaaaalalallaalaaallaaaaaaallllallaalaaallaaaaaaaalllallalaalaalalaaaalllaalaaallaaaaaaaalalaalaalalaalalalaalaaalllallalaallaal", "problemId": 2} \ No newline at end of file diff --git a/solutions/2.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000315 b/solutions/2.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000315 new file mode 100644 index 0000000..9181f5a --- /dev/null +++ b/solutions/2.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000315 @@ -0,0 +1 @@ +{"seed": 0, "tag": "lilik1", "solution": "ia! ia!", "problemId": 2} diff --git a/solutions/2.13639.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 b/solutions/2.13639.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 new file mode 100644 index 0000000..e59c987 --- /dev/null +++ b/solutions/2.13639.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 @@ -0,0 +1 @@ +{"seed": 13639, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaalalalalalalallaaaaaaaaaaaaalalalalalaaaaaaaaaaaalalalalaaaaaaaaaaaalalaaaaaaaaaaalaaaaaaaaaalaaaaaallalaaaalalallllalaalaaaaaalaalaaaallallllllaalaaaaaaallaaaalaallallllaaaaaallaaaalaallallaaaaaaalaaallaaaaaaalaallaaallalaaaaalllalllllalaallaaaalallaaaaaaaaalalallaaaaaaalallalaalalaaalaallalallaaaalallllaaaaaalaallallalal", "problemId": 2} \ No newline at end of file diff --git a/solutions/2.13948.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060 b/solutions/2.13948.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060 new file mode 100644 index 0000000..2482578 --- /dev/null +++ b/solutions/2.13948.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060 @@ -0,0 +1 @@ +{"seed": 13948, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaalalalalalalalaaaaaaaaaaaalalalalalllaaaaaaaaaaaaalalalalaaaaaaaaaaaaalalalaaaaaaaaaaaaalaaaaaaaaaalaaaaaaalaaalaalaaaaaalalallllaalaalaaaallaaaaaalaaallallllalaaaalal", "problemId": 2} \ No newline at end of file diff --git a/solutions/2.15385.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060 b/solutions/2.15385.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060 new file mode 100644 index 0000000..f45f3e4 --- /dev/null +++ b/solutions/2.15385.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060 @@ -0,0 +1 @@ +{"seed": 15385, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaaalalalalalalaaaaaaaaaaaaalalalalaaaaaaaaaaaalallllallllaaalaaaaaaaaaaalalalalaaaaaaaaaaaallaaaaaaaaalllalllaaaalllllalaaaaaaaaaaalaaaaaaaalaaaaalaalllaaaaaaaaalaal", "problemId": 2} \ No newline at end of file diff --git a/solutions/2.16783.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050 b/solutions/2.16783.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050 new file mode 100644 index 0000000..6d0a879 --- /dev/null +++ b/solutions/2.16783.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050 @@ -0,0 +1 @@ +{"seed": 16783, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaalalalalalalalaaaaaaaaaaaaalalalalalaaaaaaaaaalalalalalaaaaaaaaaaaalalalaaaaaaaaaaalaaaaaaaaalaaaaaalaall", "problemId": 2} \ No newline at end of file diff --git a/solutions/2.23027.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070 b/solutions/2.23027.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070 new file mode 100644 index 0000000..98f1f30 --- /dev/null +++ b/solutions/2.23027.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070 @@ -0,0 +1 @@ +{"seed": 23027, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaaalalalalalalaaaaaaaaaaaaalalalallaaaaaaaaaaalalalalaaaaaaaaaaaalalaaaaaaaaaallaalaaaaaaaaaallaaaaaaaaaaalaaaaaalaaaalllalaaaaalaalaaaallaallaaallalaaaaalaalaaaaallalaalaaaaalalalaalaalllaalal", "problemId": 2} \ No newline at end of file diff --git a/solutions/2.23862.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080 b/solutions/2.23862.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080 new file mode 100644 index 0000000..8ce0720 --- /dev/null +++ b/solutions/2.23862.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080 @@ -0,0 +1 @@ +{"seed": 23862, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaaalalalalalalaaaaaaaaaalalalalalalaaaaaaaaaaaaalallaaaaaaaaaalalalaaaaaaaaaalaaaaaallaalaalallaalalaallaaaaaaaalaaaaallalaalaaaaalaaaaaallalaalaalaaaaallalaallaaaallalaalaaaallalaaaaalaallaal", "problemId": 2} \ No newline at end of file diff --git a/solutions/2.25221.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 b/solutions/2.25221.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 new file mode 100644 index 0000000..55f607f --- /dev/null +++ b/solutions/2.25221.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 @@ -0,0 +1 @@ +{"seed": 25221, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaalalalalalalallaaaaaaaaaaaalalalalalalaaaaaaaaaaaaalalallaaaaaaaaaaaalalalaaaaaaaaaaaalaaaaaaaaalaaaaalaaaaaallllaaallaaaaalaaaaaallllalaaaalaaalaaalllaaaaaaalaaaalalllalaaaaallalalalalaaaaaalallaaaaaaaaalaalllaaaaallalalalalaaaallllllaaalaalalalalalaaalallalllaaaaallalalalalaalalllalaaaalalalalalaalllaaaaallalalllallaalaaalalalaall", "problemId": 2} \ No newline at end of file diff --git a/solutions/2.29639.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080 b/solutions/2.29639.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080 new file mode 100644 index 0000000..0a970ef --- /dev/null +++ b/solutions/2.29639.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080 @@ -0,0 +1 @@ +{"seed": 29639, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaalalalalalalaaaaaaaaaaalalalalallaaaaaaaaaaaalalalaaaaaaaaaaaaalaaaaaaaaaalaaaaalaalaaalaalaaaaaallalaalalallalaalalalaaaaaaaaalaaaaaalaaallaaaaaalalaalaaallallaaaallallaaaaalaaaalllaaalaaaaaalalll", "problemId": 2} \ No newline at end of file diff --git a/solutions/2.679.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050 b/solutions/2.679.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050 new file mode 100644 index 0000000..358e8c4 --- /dev/null +++ b/solutions/2.679.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050 @@ -0,0 +1 @@ +{"seed": 679, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaalalalalalalalalaaaaaaaaaaaalalalalallaaaaaaaaaaaaalalalaaaaaaaaaaaaalllaaaaaaaaaaalalaaaaaaaaalaaaaaaaalaaaaalaaal", "problemId": 2} \ No newline at end of file