Browse Source

don't send same results

adaptedStrategy0
kaos 9 years ago
parent
commit
f912e6963b
4 changed files with 14 additions and 8 deletions
  1. +13
    -6
      calculateAndSubmit
  2. +0
    -1
      solutions/1.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000315.mentedelbaracchi
  3. +0
    -1
      solutions/1.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500.strategy1
  4. +1
    -0
      submitted/1.json

+ 13
- 6
calculateAndSubmit View File

@ -1,27 +1,34 @@
#!/bin/bash
if [ $# -lt 1 ]; then
echo "missing json filename"
echo "Missing json filename"
exit 1
fi
if [ $# -lt 2 ]; then
echo "missing strategy name"
echo "Missing strategy name"
exit 1
fi
OUTPUT=`dist/build/icfp2015/icfp2015 -f $1|./filterResults.py $2`
if [ $? -eq 0 ]; then
problem=`echo $1 | cut -d '_' -f 3`
if [ "$OUTPUT" == "`cat submitted/$problem 2> /dev/null`" ]; then
echo "Same solutions alredy submitted, quitting"
exit 0
fi
read -p "Are you sure? [y/n]" -n 1 -r
echo
echo $OUTPUT > submitted/$problem
if [[ $REPLY =~ ^[Yy]$ ]]; then
exit 1
response=`curl --user :2aaFCkjNIDHAsAIh9iQHc+Y+FGhkM5Z0RQgpO6TL6EA= -X POST -H "Content-Type: application/json" -d "$OUTPUT" https://davar.icfpcontest.org/teams/235/solutions`
if [ "$response" == "created" ]; then
echo "submitted"
echo "Submitted"
else
echo $response
echo "error with server"
echo "Error with server"
fi
else
echo "submission aborted"
echo "Submission aborted"
fi
else
echo "error in vm execution"
echo "Error in vm execution"
fi

+ 0
- 1
solutions/1.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000315.mentedelbaracchi View File

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

+ 0
- 1
solutions/1.0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500.strategy1 View File

@ -1 +0,0 @@
{"seed": 0, "tag": "strategy1", "solution": "llllblaallblalllbadllllblaallblalllpppppppppppppadllllblaallblalllppppppppppppadllllblaallblalllpppppppppppadllllblaallblalllppppppppppadllllblaallblalllpppppppppadllllblaallblalllppppppppadllllblaallblalllpppppppadllllblaallblalllppppppadllllblaallblalllpppppadllllblaallblalllppppadllllblaallblalllpppadllllblaallblalllppadllllblaallblalllpadllllblaallblallbaldllllllalllblallbadllllllalllblallpppppppppppppadllllllalllblallppppppppppppadllllllalllblallpppppppppppadllllllalllblallppppppppppadllllllalllblallpppppppppadllllllalllblallppppppppadllllllalllblallpppppppadllllllalllblallppppppadllllllalllblallpppppadllllllalllblallppppadllllllalllblallpppadllllllalllblallppadllllllalllblallpadllllllalllblalbaldllllllaablalblalbbadllllllaablalblalbadllllllaablalblalppppppppppppadllllllaablalblalpppppppppppadllllllaablalblalppppppppppadllllllaablalblalpppppppppadllllllaablalblalppppppppadllllllaablalblalpppppppadllllllaablalblalppppppadllllllaablalblalpppppadllllllaablalblalppppadllllllaablalblalpppadllllllaablalblalppadllllllaablalblalpadllllllaablalblabaldlllllllaalllblabbadlllllllaalllblabadlllllllaalllblappppppppppppadlllllllaalllblapppppppppppadlllllllaalllblappppppppppadlllllllaalllblapppppppppadlllllllaalllblappppppppadlllllllaalllblapppppppadlllllllaalllblappppppadlllllllaalllblapppppadlllllllaalllblappppadlllllllaalllblapppadlllllllaalllblappadlllllllaalllblapadlllllllaalllblaldlllllllbllalaababbadlllllllbllalaababadlllllllbllalaabaldlllllllbllalaabbbadlllllllbllalaabbadlllllllbllalaabadlllllllbllalaapaldlllllllbllalaappadlllllllbllalaapadlllllllbllalaaldlllllllbllalabbadlllllllbllalabadlllllllbllalaldlllllllbllalbbadlllllllbllalbadlllllllbllalldlllllllbllabbadlllllllbllabadlllllllbllaldlllllllbllbbadlllllllbllbadlllllllbllldlllllllblbbadlllllllblbadlllllllblldlllllllbbbbadlllllllbbbadlllllllbbadlllllllbadlllllllaaablaldlllllllaaablpadlllllllaaablldlllllllaaabadlllllllaaapaalabadlllllllaaapaalaldlllllllaaapaalppppadlllllllaaapaalpppadlllllllaaapaalppadlllllllaaapaalpadlllllllaaapaabal", "problemId": 1}

+ 1
- 0
submitted/1.json View File

@ -0,0 +1 @@
[{"seed":0,"tag":"lilik0b","solution":"ia! ia!","problemId":1}]

Loading…
Cancel
Save