- Feb 1, 2008
- 602
- 0
- 76
I have this program that simulate a soccer penalty kick between 2 teams.
-The goal is 24 x 8 with coordinate (0,0) at the bottom left corner.
-Each team has 5 kickers and 1 goalkeeper (for convenience, I'll call the 2 team Team A and Team B)
-Team A - there are 5 strategies for the kickers (one for each), and there are 5 strategies for the goalkeeper (because he need a strategy for each kicker on team B)
-Team B - there are 5 strategies for the kickers (one for each), and there are 5 strategies for the goalkeeper (because he need a strategies for each kicker in team A)
- Strategy for the kicker is the coordinate (x,y) and power value. The coordinate is the location of the kick and the power is how strong the kick is. ( I will explain more on the Power attribute later). For example each kicker input strategy would be like this: (1,2) 100 or (24,7) 25
- Strategy for the goalkeeper is a coordinate and a +Width and +Height values. The
goalkeeper coverage region is a rectangle whose bottom left corner is the (x,y) position and the top right corner is (x+width, y+height). For example, (3,4) 5 5 His bottom left coor is at (3,4) and (3+5,4+5) is his top right corner of the rectangle (coverage area).
- MAX RANGE OF COVERAGE AREA IS 25% OF GOAL AREA (the program will check this)
- Power: 0-24; kick will have no error; kick hit goalkeeper coverage area 100% save
Power: 24-49 kick will have 10% error (-/+10% wide of coor); 90% save
Power: 50-75 kick will have 20% error; 80% save
Power: 76-100 kick will have 30% error; 50% save
EXAMPLE INPUT: power must be 0-100, all other values must be positive integer with 0-(2^7-1)
TEAM A
kicker: (14,3) 25 goalkeeper: (2,3) 4 4
(3,5) 50 goalkeeper: (1,1) 5,5
and so on ...
TEAM B:
Kicker: (9,3) 75 goalkeeper: (1,2) 5 5
(3,13) 100 goalkeeper: (2,3) 6 6 (assuming this won't go over 25% of goal area
and so on ....
---------------------------------------------------------------------------------------
Now what I want to do is creating a Genetic Algorithm program to come up with the best team strategy possible to beat a random team strategy and a handcrafted team strategy. The GA program should accept: random generated population, crossover, and mutation as input and output the best possible strategy.
Right now I am not sure how to start and encode this to solve the problem. How would I represent the population. Any idea?
Thanks in advance
-The goal is 24 x 8 with coordinate (0,0) at the bottom left corner.
-Each team has 5 kickers and 1 goalkeeper (for convenience, I'll call the 2 team Team A and Team B)
-Team A - there are 5 strategies for the kickers (one for each), and there are 5 strategies for the goalkeeper (because he need a strategy for each kicker on team B)
-Team B - there are 5 strategies for the kickers (one for each), and there are 5 strategies for the goalkeeper (because he need a strategies for each kicker in team A)
- Strategy for the kicker is the coordinate (x,y) and power value. The coordinate is the location of the kick and the power is how strong the kick is. ( I will explain more on the Power attribute later). For example each kicker input strategy would be like this: (1,2) 100 or (24,7) 25
- Strategy for the goalkeeper is a coordinate and a +Width and +Height values. The
goalkeeper coverage region is a rectangle whose bottom left corner is the (x,y) position and the top right corner is (x+width, y+height). For example, (3,4) 5 5 His bottom left coor is at (3,4) and (3+5,4+5) is his top right corner of the rectangle (coverage area).
- MAX RANGE OF COVERAGE AREA IS 25% OF GOAL AREA (the program will check this)
- Power: 0-24; kick will have no error; kick hit goalkeeper coverage area 100% save
Power: 24-49 kick will have 10% error (-/+10% wide of coor); 90% save
Power: 50-75 kick will have 20% error; 80% save
Power: 76-100 kick will have 30% error; 50% save
EXAMPLE INPUT: power must be 0-100, all other values must be positive integer with 0-(2^7-1)
TEAM A
kicker: (14,3) 25 goalkeeper: (2,3) 4 4
(3,5) 50 goalkeeper: (1,1) 5,5
and so on ...
TEAM B:
Kicker: (9,3) 75 goalkeeper: (1,2) 5 5
(3,13) 100 goalkeeper: (2,3) 6 6 (assuming this won't go over 25% of goal area
and so on ....
---------------------------------------------------------------------------------------
Now what I want to do is creating a Genetic Algorithm program to come up with the best team strategy possible to beat a random team strategy and a handcrafted team strategy. The GA program should accept: random generated population, crossover, and mutation as input and output the best possible strategy.
Right now I am not sure how to start and encode this to solve the problem. How would I represent the population. Any idea?
Thanks in advance
