Pseudo Code For Go Daddy Go and Point Eval
Pseudo Code For Go Daddy Go and Point Eval
Pos ← curr_position
R ← Radi
return [
Pos,
[(Pos[0] - R) * 0.66, (Pos[1] - R) * 0.33],
[(Pos[0] + R) * 0.66, (Pos[1] + R) * 0.33],
[(Pos[0] + R) * 0.66, (Pos[1] - R) * 0.33],
[(Pos[0] - R) * 0.66, (Pos[1] + R) * 0.33],
[(Pos[0] - R) * 0.33, (Pos[1] - R) * 0.66],
[(Pos[0] + R) * 0.33, (Pos[1] + R) * 0.66],
[(Pos[0] + R) * 0.33, (Pos[1] - R) * 0.66],
[(Pos[0] - R) * 0.33, (Pos[1] + R) * 0.66]
]
end function
StaminaWeight ← 0
key ← Get_key_pos(state, Point2 as pb2.RpcVector2D)
Count ← Pass_count for player's uniform number in Pass_count array
Update Pass_count for player and teammate uniform numbers
Stamina_ ← Stamina for teammate's uniform number
Opponents_pos ← array
try
Total_dis_to_oppo ← (Total_dis * 12) / (Density * Radi)
catch ZeroDivisionError
Total_dis_to_oppo ← 0
end try
Total ← 0
for each player in state.world_model.our_players_dict do
if player.uniform_number = 11 and player.position.x ≥ 11 then
Total ← Total + 20
end if
end for
Density ← Density * 2
Dis_to_goal ← average distance from Point1 and Point2 to goal
Interception_prob ← interception probability between Point1 and Point2 with
Opponents_pos
Point_dis ← distance between Point1 and Point2
function G_D_G(state):
Teammates ← state.world_model.our_players_dict
Small_radai ← 4
Large_radai ← 20
Pos_ ← position of self in world model
Edges ← {}
Points_cand ← array of Get_Points for each position in Candinates
Min_edge ← None
Min_edge_weight ← infinity
X, Y, X1, Y1 ← Min_edge
if X = Pos_[0] and Y = Pos_[1] then
return ("Pass", pb2.RpcVector2D(X1, Y1))
else
return ("Dribble", pb2.RpcVector2D(X, Y))
end if
end function