diff --git a/r2sol.cc b/r2sol.cc index d84b2fbb84ea75a0644b0a200da83c259b38ce8a..906527475a51cb6edf56e4e76ecf50b6786fdaa4 100644 --- a/r2sol.cc +++ b/r2sol.cc @@ -31,7 +31,7 @@ using namespace std; #define NMAX 201 #define MAXNODES 3000 #define TMAX 2807//2567 -#define MAX_NUM_THREADS 1//4 +#define MAX_NUM_THREADS 2//4 #define MAX_CTURNS 5 #define INF 10000 #define ZERO 0.000001 @@ -1290,7 +1290,7 @@ void RandomPermutations(int tid, int ntries) { auto& tmp_path2_tid = tmp_path2[tid]; auto& tmax_at_poz_node_tid = tmax_at_poz_node[tid]; - if (tid == 0) { + if (0&&tid == 0) { shpaths_sorted.resize(N); for (int aid = 0; aid < N; ++aid) { shpaths_sorted[aid].second = aid; @@ -1301,13 +1301,13 @@ void RandomPermutations(int tid, int ntries) { } for (int trial = 1; trial <= ntries; ++trial) { - if (tid == 0 && trial <= 2) { + if (0&&tid == 0 && trial <= 2) { for (int i = 0; i < N; ++i) perm_tid[i] = shpaths_sorted[i].second; reverse(shpaths_sorted.begin(), shpaths_sorted.end()); } else { for (int i = 0; i < N; ++i) pused_tid[i] = 0; int idx = 0; - if ((trial & 1) == 1) { + if (0&&(trial & 1) == 1) { for (int cturns = MAX_CTURNS - 1; cturns >= 0; --cturns) { const auto& cturns_agents_cturns = cturns_agents[cturns]; const auto& num_cturns_agents_cturns = num_cturns_agents[cturns]; @@ -2182,8 +2182,8 @@ void GetMoves(const char* testid, bool replay_mode = false) { ReinitDataStructures(); ComputeShortestPaths(); } - SCORE_EXPONENT1 = 0.5;//0.5; - SCORE_EXPONENT2 = 0.5;//0.5; + SCORE_EXPONENT1 = 0.75;//0.5; + SCORE_EXPONENT2 = 0.75;//0.5; DBG(2, "testid=%s TINIT=%d: resc=%d nda=%d npl=%d\n", testid, TINIT, reschedule, num_done_agents, num_planned); if (reschedule) { if (TINIT >= MIN_TINIT_FOR_SAVE_DATA_FOR_REPLAY) SaveDataForReplay(testid); @@ -2220,42 +2220,3 @@ int main() { return 0; } -/* -7 106 77.9411764706 -41039.8333333419 -1 -0.7352941176 -0.7352941176 -8 89 74.1666666667 -38377.8333333369 -3 -2.5000000000 -1.6176470588 -9 70 45.7516339869 -74273.9166666784 -1 -0.6535947712 -1.2962962963 -10 105 62.5000000000 -87083.1666666212 -11 -6.5476190476 -2.6091269841 -11 101 97.1153846154 -16509.0000000046 -2 -1.9230769231 -2.4719169719 -12 74 67.2727272727 -47107.0000000187 0 0.0000000000 -2.0599308099 -13 138 86.7924528302 -54212.0833333818 6 3.7735849057 -1.2265714220 -14 108 87.8048780488 -48798.6666666931 14 11.3821138211 0.3495142334 -15 84 44.2105263158 -147553.9999999457 -6 -3.1578947368 -0.0401978744 -16 57 50.8928571429 -72708.7500000140 13 11.6071428571 1.1245361988 -17 116 80.5555555556 -53987.7500000403 15 10.4166666667 1.9692753322 -18 110 59.7826086957 -58555.7500000475 27 14.6739130435 3.0279951415 -19 78 97.5000000000 -21714.4166666624 10 12.5000000000 3.7566108998 -20 124 94.6564885496 -38370.2499999949 4 3.0534351145 3.7063840580 -21 100 83.3333333333 -44220.2500000111 17 14.1666666667 4.4037362319 -22 67 60.3603603604 -59060.1666667085 6 5.4054054054 4.4663405553 -23 151 92.6380368098 -55170.9166667116 8 4.9079754601 4.4923190791 -24 80 100.0000000000 -20363.4166666652 0 0.0000000000 4.2427457969 -*/ - -/* -0 114 84.4444444444 -50443.5000000380 -6 -4.4444444444 -4.4444444444 -1 110 78.5714285714 -41208.8333333436 2 1.4285714286 -1.5079365079 -2 63 52.0661157025 -49503.0833333628 -4 -3.3057851240 -2.1072193799 -3 80 100.0000000000 -12103.2500000025 0 0.0000000000 -1.5804145350 -4 134 86.4516129032 -92102.3333332341 2 1.2903225806 -1.0062671118 -5 128 97.7099236641 -37359.9166666591 -3 -2.2900763359 -1.2202353158 -6 161 93.0635838150 -64314.6666667263 0 0.0000000000 -1.0459159850 -7 116 85.2941176471 -41825.2500000115 9 6.6176470588 -0.0879706045 -8 86 71.6666666667 -42182.8333333483 -6 -5.0000000000 -0.6337516485 -9 57 37.2549019608 -81168.9166666624 -14 -9.1503267974 -1.4854091634 -10 110 65.4761904762 -87335.9166666238 -6 -3.5714285714 -1.6750472914 -11 100 96.1538461538 -17626.8333333361 -3 -2.8846153846 -1.7758446325 -12 72 65.4545454545 -46933.2500000213 -2 -1.8181818182 -1.7791013391 -13 137 86.1635220126 -50230.8333333654 5 3.1446540881 -1.4274045228 -14 94 76.4227642276 -51649.7500000278 0 0.0000000000 -1.3322442213 -15 86 45.2631578947 -149843.5833332979 -4 -2.1052631579 -1.3805579049 -*/