forked from electroheart-gh/CodersStrikeBack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmemo.txt
130 lines (99 loc) · 4.02 KB
/
memo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
### TODO ###
# Improve methods for matplotlib in Debug Tool to use OO style
# Improve Fast-Early-Pivot
Evaluate the thrust actions by calculating virtual distance for the next 2 CP considering location,
inertia, and angle.
### DONE ###
# Investigate Fast-Early-Pivot
It seems to begin the pivot too late.
-> It is because it counts turns for only the next checkpoint.
-> To improve thrust control, adjust thrust target and power considering inertia not only for the next turn but also
for the following 5 turns. Considering more than 5 turns makes the pod too slow during the pivot.
# Improve SHIELD
Do not use SHIELD if it bumps from sides or behind.
# Improve DebugTool
Implement timer
Implement plot_pod_trajectory
# Create series of methods for Pod move simulation
Returns sequential moves according to the specified instruction by list[Pod]
NOTE: The first element represent current Pod with setting values to thrust_target and thrust_power
NOTE: Ignores self.thrust_target and self.thrust_power
NOTE: Does not update next_cp_id
plan_moves(checkpoint) -> moves to the CP considering CP_RADIUS
plan_moves(list[thrust_vector]) -> moves according to the specified thrust_vectors in the list
plan_*_moves()
Returns Pod as of next turn by arguments thrust_target and thrust_power
next_move()
And copy()
# Improve thrust_as_vector() to hold direction regardless of magnitude
# Improve Early-Pivot
next_location -> fixed
# Changed function and variable name for readability
# Try Pycharm type hinting smarter
Some unresolved reference warning was eliminated by setting ignoring reference
Upgrading Python to 3.6 does not work for unable to resolve 'List' in type hinting
Importing typing for 'List' is not good because it makes error in the Codingame
# Suspend development for OIO
# BUG FIX
Latent bug in angle_for_location
# Close to CP, ttr should be more precise
-> check calculation for ttr
-> FIXED
# Moving like satellite for CP
-> thrust value might be too much for both Early-Pivot and OIO Move.
-> Seems fixed by fixes mentioned below
-> FIXED
# Check rotate()
-> rotate() is wrong. it rotates wrong direction.
-> need to check all usage. most of them might be modified in the condition expression
404, 407 in C-Move should not be modified. (it means it NOW does NOT work)
-> Thought FIXED. That was NOT TRUE
-> Pod.thrust_vector() was WRONG!! -> Pod.next_location() was affected in Shielding Implementation
-> FIXED
# Check angle_for()
-> angle_for() is right
-> need to check all usage (ok: 229, 232, 360(*1), 411, 260, 261(*2), 403)
*1 but 361 should be fixed when fixing rotate()
*2 but 263,266 should be fixed when fixing rotate() -> fixed by 258(argument of angle_for)
** 276, 278, 284, 286 -> fixed 271(condition exp) for 276 & 278, 283(condition exp) for 284 & 286
-> Finished except for mentioned above
# Question: Angle should get close to the target
-> gave up use of plt.quiver (direction was wrong. No idea for the reason)
-> Fixed to pass abs_angle as degrees instead of radians for Pod.__init__
-> Fixed to use sin instead of cos to calculate excessive component
-> Fixed to set the result of simulation to trj[i].thrust_vector instead of trj[i+1]
and set the value to p.thrust_vector from trj[i].thrust_vector
-> FIXED
# rotation may be wrong??? condition of if statement or rotation method?
i=3
target_vector=[ 97.84128862 -20.66596818]
trj[i].location =[6020 6924]
trj[i].inertia=[545 10]
loc=[ 6662.84128862 6913.33403182]
target_vector.abs_angle()=6.0750256029099265
# Question: Inertia not matched to move
-> wrong use of plt.quiver
-> FIXED
# Options for good test course
seed = 330280693
pod_per_player = 2
pod_timeout = 100
map = 3309
7213
14562
7698
10586
5050
13073
2301
4574
2203
7373
4911
# Standard Input for each turn
x: x position of your pod
y: y position of your pod
vx: x speed of your pod
vy: y speed of your pod
angle: angle of your pod, radians between 0 and 2 * pi <= wrong
next_checkpoint_id: next check point id of your pod