Browse Source

fix calculateAndSubmit and added some solutions

adaptedStrategy0
kaos 9 years ago
parent
commit
7045caebb8
13 changed files with 23 additions and 9 deletions
  1. +2
    -1
      calculateAndSubmit
  2. +10
    -8
      filterResults.py
  3. +1
    -0
      solutions/2.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100
  4. +1
    -0
      solutions/2.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000315
  5. +1
    -0
      solutions/2.13639.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110
  6. +1
    -0
      solutions/2.13948.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060
  7. +1
    -0
      solutions/2.15385.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060
  8. +1
    -0
      solutions/2.16783.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050
  9. +1
    -0
      solutions/2.23027.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070
  10. +1
    -0
      solutions/2.23862.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080
  11. +1
    -0
      solutions/2.25221.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110
  12. +1
    -0
      solutions/2.29639.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080
  13. +1
    -0
      solutions/2.679.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050

+ 2
- 1
calculateAndSubmit View File

@ -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


+ 10
- 8
filterResults.py View File

@ -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)


+ 1
- 0
solutions/2.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100 View File

@ -0,0 +1 @@
{"seed": 0, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaalalalalalalalaaaaaaaaaaaalalalalalalaaaaaaaaaaaaalalalalaaaaaaaaaalalalalaaaaaaaaaaaalaaaaaaaaaalaaaaaaallaaaaaaalaaallaalaaaalaalaaalllaalalaaallaaaaaaalaaaalalallaalaaallaaaaaaallllallaalaaallaaaaaaaalllallalaalaalalaaaalllaalaaallaaaaaaaalalaalaalalaalalalaalaaalllallalaallaal", "problemId": 2}

+ 1
- 0
solutions/2.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000315 View File

@ -0,0 +1 @@
{"seed": 0, "tag": "lilik1", "solution": "ia! ia!", "problemId": 2}

+ 1
- 0
solutions/2.13639.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 View File

@ -0,0 +1 @@
{"seed": 13639, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaalalalalalalallaaaaaaaaaaaaalalalalalaaaaaaaaaaaalalalalaaaaaaaaaaaalalaaaaaaaaaaalaaaaaaaaaalaaaaaallalaaaalalallllalaalaaaaaalaalaaaallallllllaalaaaaaaallaaaalaallallllaaaaaallaaaalaallallaaaaaaalaaallaaaaaaalaallaaallalaaaaalllalllllalaallaaaalallaaaaaaaaalalallaaaaaaalallalaalalaaalaallalallaaaalallllaaaaaalaallallalal", "problemId": 2}

+ 1
- 0
solutions/2.13948.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060 View File

@ -0,0 +1 @@
{"seed": 13948, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaalalalalalalalaaaaaaaaaaaalalalalalllaaaaaaaaaaaaalalalalaaaaaaaaaaaaalalalaaaaaaaaaaaaalaaaaaaaaaalaaaaaaalaaalaalaaaaaalalallllaalaalaaaallaaaaaalaaallallllalaaaalal", "problemId": 2}

+ 1
- 0
solutions/2.15385.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060 View File

@ -0,0 +1 @@
{"seed": 15385, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaaalalalalalalaaaaaaaaaaaaalalalalaaaaaaaaaaaalallllallllaaalaaaaaaaaaaalalalalaaaaaaaaaaaallaaaaaaaaalllalllaaaalllllalaaaaaaaaaaalaaaaaaaalaaaaalaalllaaaaaaaaalaal", "problemId": 2}

+ 1
- 0
solutions/2.16783.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050 View File

@ -0,0 +1 @@
{"seed": 16783, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaalalalalalalalaaaaaaaaaaaaalalalalalaaaaaaaaaalalalalalaaaaaaaaaaaalalalaaaaaaaaaaalaaaaaaaaalaaaaaalaall", "problemId": 2}

+ 1
- 0
solutions/2.23027.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070 View File

@ -0,0 +1 @@
{"seed": 23027, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaaalalalalalalaaaaaaaaaaaaalalalallaaaaaaaaaaalalalalaaaaaaaaaaaalalaaaaaaaaaallaalaaaaaaaaaallaaaaaaaaaaalaaaaaalaaaalllalaaaaalaalaaaallaallaaallalaaaaalaalaaaaallalaalaaaaalalalaalaalllaalal", "problemId": 2}

+ 1
- 0
solutions/2.23862.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080 View File

@ -0,0 +1 @@
{"seed": 23862, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaaalalalalalalaaaaaaaaaalalalalalalaaaaaaaaaaaaalallaaaaaaaaaalalalaaaaaaaaaalaaaaaallaalaalallaalalaallaaaaaaaalaaaaallalaalaaaaalaaaaaallalaalaalaaaaallalaallaaaallalaalaaaallalaaaaalaallaal", "problemId": 2}

+ 1
- 0
solutions/2.25221.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000110 View File

@ -0,0 +1 @@
{"seed": 25221, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaalalalalalalallaaaaaaaaaaaalalalalalalaaaaaaaaaaaaalalallaaaaaaaaaaaalalalaaaaaaaaaaaalaaaaaaaaalaaaaalaaaaaallllaaallaaaaalaaaaaallllalaaaalaaalaaalllaaaaaaalaaaalalllalaaaaallalalalalaaaaaalallaaaaaaaaalaalllaaaaallalalalalaaaallllllaaalaalalalalalaaalallalllaaaaallalalalalaalalllalaaaalalalalalaalllaaaaallalalllallaalaaalalalaall", "problemId": 2}

+ 1
- 0
solutions/2.29639.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080 View File

@ -0,0 +1 @@
{"seed": 29639, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaaaalalalalalalaaaaaaaaaaalalalalallaaaaaaaaaaaalalalaaaaaaaaaaaaalaaaaaaaaaalaaaaalaalaaalaalaaaaaallalaalalallalaalalalaaaaaaaaalaaaaaalaaallaaaaaalalaalaaallallaaaallallaaaaalaaaalllaaalaaaaaalalll", "problemId": 2}

+ 1
- 0
solutions/2.679.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000050 View File

@ -0,0 +1 @@
{"seed": 679, "tag": "lilik1", "solution": "aaaaaaaaaaaalalalalalalallaaaaaaaaaalalalalalalalalaaaaaaaaaaaalalalalallaaaaaaaaaaaaalalalaaaaaaaaaaaaalllaaaaaaaaaaalalaaaaaaaaalaaaaaaaalaaaaalaaal", "problemId": 2}

Loading…
Cancel
Save