Added licensing info.
[golden_search.git] / README
blobeb74460a7c4b065ac5d0eafe7b5bc38b40ebcfdb
1 This project is released under GNU GPL v3.0, see the file LICENSE.
4 Golden Search
5 -----------
7 The code implements simple algorithm for finding combinations of numbers, that are similar to some natural constants.
9 E.g. you want to prove, that your house has been made by aliens. You measure size of door, size of house, size of few windows and put this in the program. Voilla. Ratio between door surface and chimney surface is Pi! Ratio between window size and house height is Euler's number. Etc...
12 HowTo:
14 1) So you have some measurements, like in stanek_data.py
15 You should have as much measurements as possible, to have as high precision as possibe.
16 Also you should get the method precision (like half of the lowest unit on the scale you have on the measuring device)
18 stanek.py
19 2) Now, you may use the Method Analyzer class, which reads in the measurements, and computes average deviation, for you to have at least some
20    estimate of each method's (+ measuring process) standart deviation.
21    (you want this, since if you measure twice and you have (by coincidence) [1000, 1000] im milimeters, this does not mean, the measured thing is 
22    in fact 1000 milimeters long with sd=0...)
24 3) Now you should define operators for each round.
25 With the current search algorithm, you may either define ending round, or define maximum
26 memory usage. If so, when the memory limit is reached, only one more round is made (last round does not take up memory, since we do not need to store
27 intermediate results).
29 4) Define targets you want to reach, using the Correlation Checker
30     
33 ALGORITHM:
34 in search.py
35 the algorithm works in stages. Each stage (except the first one) combines the numbers from previous stages using the defined OPERATORS.
36 e.g.
37 OPS = { +, - }
38 N0 = { 11, 20 }         // numbers from measurements
39 N1 = { 11 + 20, 11 - 20, 20 - 11 }
40 N2 = {  11 + (11 + 20), 11 + (11 - 20), 11 + (20 - 11),         // 11 from N0 + N1
41         20 + (11 + 20), 20 + (11 - 20), 20 + (20 - 11),         // 20 from N0 + N1
42         (11 + 20) + (11 + 20), (11 + 20) + (11 - 20), (11 + 20)  + (20 - 11)        // (11 + 20) from N1 + N1
43         ...
44         ...
45         ...