#
# Leap years.
# See http://en.wikipedia.org/wiki/Leap_year
# 
# Pseudo code:
#   if year modulo 400 is 0
#      then is_leap_year
#   else if year modulo 100 is 0
#      then not_leap_year
#   else if year modulo 4 is 0
#      then is_leap_year
#   else
#       not_leap_year
#
# These years are leap years:
# 1200 1600 
# 1892 1896 1904 1908 1912 1916 1920 1924 1928 1932 
# 1936 1940 1944 1948 1952 1956 1960 1964 1968 1972 
# 1976 1980 1984 1988 1992 1996 2000 2004 2008 2012 
# 2016 2020 2024 2028
#
# One solutions (with just 1890..2030)
# Evolving generation 701/1800(time from start: 93,30s)
# Best solution fitness: 0.0 (error method: totalError)
# Best solution: if(((year mod 380.0) / 458.0) <= (year mod (year / 458.0))) then (((380.0 - 380.0) * (((year mod year) / year) * (year + year)))) else((year / year))
# Depth of chrom: 5. Number of functions+terminals: 27 (12 functions, 15 terminals)
# Correlation coefficient: 1.0
# minError: 0.0 meanError: 0.0 medianError: 0.0 maxError: 4.9E-324 totalError: 0.0
# 
# Another solution:
# Evolving generation 886/1000(time from start: 129,88s)
# Best solution fitness: 0.0 (error method: totalError)
# Best solution: (y / y) mod ((y + (if(((y mod 679.0) * (((if(y <= 479.0) then (y) else(y)) * (if(y <= ((y mod (517.0 - (y mod 265.0))) * 126.0)) then (126.0) else(387.0))) mod 24.0)) <= 270.0) then (265.0) else(y))) mod y)
# Depth of chrom: 12. Number of functions+terminals: 37 (15 functions, 22 terminals)
# Correlation coefficient: 1.0
# minError: 0.0 meanError: 0.0 medianError: 0.0 maxError: 4.9E-324 totalError: 0.0
#
presentation: Leap years
num_input_variables: 1
variable_names: y leap_year
# functions: Multiply,Divide,Add,Subtract,ModuloD,IfElseD
# functions: Multiply,Divide,Add,Subtract,ModuloD,IfElseD,IfLessThanOrEqualD
# No If/Else
functions: Multiply,Add,Divide,Subtract,ModuloD
terminal_range: 0 1000
terminal_wholenumbers: true
max_init_depth: 4
population_size: 1000
max_crossover_depth: 8
num_evolutions: 1000
max_nodes: 151
mutation_prob: 0.25
crossover_prob: 0.9
show_progression: false
show_similiar: true
data
# added these to get more 100/400 rules
1200 1
1300 0
1400 0
1500 0
1600 1
1700 0
1800 0

1890 0
1891 0
1892 1
1893 0
1894 0
1895 0
1896 1
1897 0
1898 0
1899 0
1900 0
1901 0
1902 0
1903 0
1904 1
1905 0
1906 0
1907 0
1908 1
1909 0
1910 0
1911 0
1912 1
1913 0
1914 0
1915 0
1916 1
1917 0
1918 0
1919 0
1920 1
1921 0
1922 0
1923 0
1924 1
1925 0
1926 0
1927 0
1928 1
1929 0
1930 0
1931 0
1932 1
1933 0
1934 0
1935 0
1936 1
1937 0
1938 0
1939 0
1940 1
1941 0
1942 0
1943 0
1944 1
1945 0
1946 0
1947 0
1948 1
1949 0
1950 0
1951 0
1952 1
1953 0
1954 0
1955 0
1956 1
1957 0
1958 0
1959 0
1960 1
1961 0
1962 0
1963 0
1964 1
1965 0
1966 0
1967 0
1968 1
1969 0
1970 0
1971 0
1972 1
1973 0
1974 0
1975 0
1976 1
1977 0
1978 0
1979 0
1980 1
1981 0
1982 0
1983 0
1984 1
1985 0
1986 0
1987 0
1988 1
1989 0
1990 0
1991 0
1992 1
1993 0
1994 0
1995 0
1996 1
1997 0
1998 0
1999 0
2000 1
2001 0
2002 0
2003 0
2004 1
2005 0
2006 0
2007 0
2008 1
2009 0
2010 0
2011 0
2012 1
2013 0
2014 0
2015 0
2016 1
2017 0
2018 0
2019 0
2020 1
2021 0
2022 0
2023 0
2024 1
2025 0
2026 0
2027 0
2028 1
2029 0
2030 0

