-
Notifications
You must be signed in to change notification settings - Fork 1
/
GA.h
28 lines (24 loc) · 580 Bytes
/
GA.h
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
#ifndef GA_h
#define GA_h
#ifndef MAX_BOARD
#define MAX_BOARD 100
#endif
/*GA DATA*/
#ifndef individualNum
#define individualNum 32 //Number of individuals.
#endif
#ifndef interationNum
#define interationNum 256 //Number of interation times.
#endif
/*GD END*/
/*GA FUNC*/
void GA();
void resizeVector_GA(); //Resize all vector
void init_GA(); //Initial.
void getValue_GA(); //Get individual's value.
void getBest_GA(); //Get the best individual.
void choose_GA(); //Spin table choose.
void recombine_GA(); //Recombine
void mutate_GA(); //Mutate
/*GAFC END*/
#endif /* GA_h */