diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7f8ef2c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +bin/ +.vscode/ +bots/follow.ml \ No newline at end of file diff --git a/answer.txt b/answer.txt index c672c65..87c85af 100644 --- a/answer.txt +++ b/answer.txt @@ -1 +1 @@ -270 100 +270 200 diff --git a/bin/back b/bin/back index 9ed0509..a275ff8 100755 Binary files a/bin/back and b/bin/back differ diff --git a/lastActions.txt b/lastActions.txt index 344fda5..39cd64d 100644 --- a/lastActions.txt +++ b/lastActions.txt @@ -1,68 +1,8 @@ --18.422713 -176.076801 --7.020887 -230.177778 --4.520750 -219.581399 --4.463651 -166.253025 -185.488698 -20.745149 -194.457151 -12.645542 -15.536898 -214.021351 --14.661352 -229.591860 -169.429180 -12.357431 -205.176534 -25.599484 --11.796178 -230.418216 -24.377212 -213.365001 -17.041185 179.830947 -190.815708 20.580724 -189.314747 -12.899597 --11.629750 -211.150224 -12.337279 -173.726717 -0.000254 184.344335 --10.038741 198.842165 -5.666371 -213.933822 --14.627645 -168.695567 --14.523843 -173.186164 --16.809179 199.152874 -5.907002 -211.095601 --18.909848 -167.973241 -19.054749 -163.897611 -7.139926 207.663326 -0.272239 -224.970670 -187.598498 16.404734 -179.769347 -16.771815 --19.361183 -196.079116 -215.692477 -3.667610 -15.616109 -189.003404 --17.531907 182.190821 -17.989057 -190.400513 --9.511825 234.189681 -199.192961 2.734451 --186.307904 17.161294 -186.595470 -24.932493 -210.766575 -27.416865 -220.868582 6.016359 --163.798702 17.955681 -14.836006 182.767932 -216.437004 25.342977 -18.276022 217.322325 --183.591585 -21.481311 --194.045676 -0.224849 -234.467865 14.146990 --213.300653 -11.066723 --180.329256 13.394246 --197.220384 -8.255668 -6.316474 208.755529 --206.630095 11.522920 --185.564188 -4.332933 -9.899927 180.108674 --232.050486 -21.155205 --201.660961 -14.888540 --164.773539 -8.076386 --188.455821 -3.786201 --217.261009 -4.470115 --212.863197 -3.619766 --7.006592 -177.015214 -15.446748 -180.253797 --209.173837 20.790962 --204.436731 14.747903 --229.235179 19.156590 --6.343615 -186.631927 --3.893746 -229.179855 +-0.000000 -0.000000 +-0.000000 -0.000000 +0.000000 -0.000000 +-0.000000 -0.000000 +-0.000000 -0.000000 +0.000000 -0.000000 +-0.000000 -0.000000 +-0.000000 -0.000000 diff --git a/leaderboard.txt b/leaderboard.txt index 2a036af..6b4a443 100644 --- a/leaderboard.txt +++ b/leaderboard.txt @@ -1,11 +1,11 @@ name, elo -./bots/dumb 1405 -./bots/dumb2 1504 -./bots/dumb3 1487 -./bots/dumb4 1392 +./bots/dumb 1347 +./bots/dumb2 1404 +./bots/dumb3 1355 +./bots/dumb4 1466 ./bots/dumb5 540 ./bots/dumb6 562 -./bots/follow1 562 -./bots/follow2 600 -./bots/follow3 612 -./bots/follow4 545 +./bots/follow1 616 +./bots/follow2 702 +./bots/follow3 641 +./bots/follow4 617 diff --git a/obj/main.o b/obj/main.o index 9761d0a..af6f249 100644 Binary files a/obj/main.o and b/obj/main.o differ diff --git a/obj/structure.o b/obj/structure.o index be71b7e..5f5f4c8 100644 Binary files a/obj/structure.o and b/obj/structure.o differ diff --git a/output.txt b/output.txt index a01ac1c..601df98 100644 --- a/output.txt +++ b/output.txt @@ -1,8 +1,8 @@ 4 -0 (1 3) (25.15 20.43) -1 (1 2) (46.28 29.61) -2 (1 2) (9.84 44.40) -3 (1 4) (30.06 26.11) +0 (0 1) (79.84 55.26) +1 (0 1) (63.60 77.08) +2 (0 1) (36.40 77.08) +3 (0 1) (20.16 55.26) 3 5 9 @@ -12,6 +12,6 @@ S...035.0 .0..31115 .2115.... -100 200 5 0.90 0.80 0.20 0.60 +100 200 5 0.90 0.80 0.20 0.00 Room Size, Maximum speed, Player Radius, Friction, Restitution factor, Track Distance to Edge, Magnetic Field \ No newline at end of file diff --git a/src/main.c b/src/main.c index 3c8d567..b4bb957 100644 --- a/src/main.c +++ b/src/main.c @@ -98,6 +98,9 @@ void player_turn(int id, char* exec) { FILE* ptr = fopen("answer.txt", "r"); int angle, mult; fscanf(ptr, "%d %d", &angle, &mult); + if(mult > 100 || mult < 0) { + mult = 0; + } fclose(ptr); double dvx = 1.0+(rand()%200-100)/100.0*(DELTA_V/100.0); double dvy = 1.0+(rand()%200-100)/100.0*(DELTA_V/100.0); diff --git a/src/structure.c b/src/structure.c index 7c77c29..c3b0d49 100644 --- a/src/structure.c +++ b/src/structure.c @@ -33,13 +33,13 @@ const double DELTA_THETA = 7.0; // degrees const double WIND_X = 0.0; const double WIND_Y = 0.0; -double B = 0.6; // 0.6 works fine +double B = 0.0; // 0.6 works fine // ------------------------------------------------------------------------------------------ // void write_output(char* stream, level* lvl, int nPl) { FILE* ptr = fopen(stream, "w"); - fprintf(ptr, "%d\n",nPlayers); + fprintf(ptr, "%d\n", nPlayers); for(int p = 0; p < nPlayers; p++) { fprintf(ptr, "%d (%d %d) (%.2lf %.2lf)\n", p, players[p].c->chx, players[p].c->chy, players[p].c->pos.fx, players[p].c->pos.fy); } diff --git a/tempLeader.txt b/tempLeader.txt index 2a036af..6b4a443 100644 --- a/tempLeader.txt +++ b/tempLeader.txt @@ -1,11 +1,11 @@ name, elo -./bots/dumb 1405 -./bots/dumb2 1504 -./bots/dumb3 1487 -./bots/dumb4 1392 +./bots/dumb 1347 +./bots/dumb2 1404 +./bots/dumb3 1355 +./bots/dumb4 1466 ./bots/dumb5 540 ./bots/dumb6 562 -./bots/follow1 562 -./bots/follow2 600 -./bots/follow3 612 -./bots/follow4 545 +./bots/follow1 616 +./bots/follow2 702 +./bots/follow3 641 +./bots/follow4 617