capped speed

This commit is contained in:
Alexandre 2025-06-06 12:46:57 +02:00
parent b9401698e3
commit 872e5d7315
11 changed files with 38 additions and 92 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
bin/
.vscode/
bots/follow.ml

View File

@ -1 +1 @@
270 100 270 200

BIN
bin/back

Binary file not shown.

View File

@ -1,68 +1,8 @@
-18.422713 -176.076801 -0.000000 -0.000000
-7.020887 -230.177778 -0.000000 -0.000000
-4.520750 -219.581399 0.000000 -0.000000
-4.463651 -166.253025 -0.000000 -0.000000
185.488698 -20.745149 -0.000000 -0.000000
194.457151 -12.645542 0.000000 -0.000000
15.536898 -214.021351 -0.000000 -0.000000
-14.661352 -229.591860 -0.000000 -0.000000
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

View File

@ -1,11 +1,11 @@
name, elo name, elo
./bots/dumb 1405 ./bots/dumb 1347
./bots/dumb2 1504 ./bots/dumb2 1404
./bots/dumb3 1487 ./bots/dumb3 1355
./bots/dumb4 1392 ./bots/dumb4 1466
./bots/dumb5 540 ./bots/dumb5 540
./bots/dumb6 562 ./bots/dumb6 562
./bots/follow1 562 ./bots/follow1 616
./bots/follow2 600 ./bots/follow2 702
./bots/follow3 612 ./bots/follow3 641
./bots/follow4 545 ./bots/follow4 617

Binary file not shown.

Binary file not shown.

View File

@ -1,8 +1,8 @@
4 4
0 (1 3) (25.15 20.43) 0 (0 1) (79.84 55.26)
1 (1 2) (46.28 29.61) 1 (0 1) (63.60 77.08)
2 (1 2) (9.84 44.40) 2 (0 1) (36.40 77.08)
3 (1 4) (30.06 26.11) 3 (0 1) (20.16 55.26)
3 3
5 9 5 9
@ -12,6 +12,6 @@ S...035.0
.0..31115 .0..31115
.2115.... .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 Room Size, Maximum speed, Player Radius, Friction, Restitution factor, Track Distance to Edge, Magnetic Field

View File

@ -98,6 +98,9 @@ void player_turn(int id, char* exec) {
FILE* ptr = fopen("answer.txt", "r"); FILE* ptr = fopen("answer.txt", "r");
int angle, mult; int angle, mult;
fscanf(ptr, "%d %d", &angle, &mult); fscanf(ptr, "%d %d", &angle, &mult);
if(mult > 100 || mult < 0) {
mult = 0;
}
fclose(ptr); fclose(ptr);
double dvx = 1.0+(rand()%200-100)/100.0*(DELTA_V/100.0); 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); double dvy = 1.0+(rand()%200-100)/100.0*(DELTA_V/100.0);

View File

@ -33,7 +33,7 @@ const double DELTA_THETA = 7.0; // degrees
const double WIND_X = 0.0; const double WIND_X = 0.0;
const double WIND_Y = 0.0; const double WIND_Y = 0.0;
double B = 0.6; // 0.6 works fine double B = 0.0; // 0.6 works fine
// ------------------------------------------------------------------------------------------ // // ------------------------------------------------------------------------------------------ //

View File

@ -1,11 +1,11 @@
name, elo name, elo
./bots/dumb 1405 ./bots/dumb 1347
./bots/dumb2 1504 ./bots/dumb2 1404
./bots/dumb3 1487 ./bots/dumb3 1355
./bots/dumb4 1392 ./bots/dumb4 1466
./bots/dumb5 540 ./bots/dumb5 540
./bots/dumb6 562 ./bots/dumb6 562
./bots/follow1 562 ./bots/follow1 616
./bots/follow2 600 ./bots/follow2 702
./bots/follow3 612 ./bots/follow3 641
./bots/follow4 545 ./bots/follow4 617