Browse Source

Add stuff on report

espitau 8 years ago
parent
commit
dcd04a6587

BIN
Results/.DS_Store


BIN
Results/random_iter.png


BIN
Results/random_iter_3.png


BIN
Results/res_gen_2.png


BIN
Results/res_gen_2_zoom.png


BIN
Results/res_gen_3_zoom.png


BIN
Results/res_gen_4_zoom.png


BIN
Results/res_temp_2_zoom.png


BIN
Results/resu_2_temp.png


BIN
Results/resu_temp3.png


BIN
Results/resu_temp3_zoom.png


BIN
Results/sa_iter.png


BIN
Results/wrap_2.png


BIN
Results/wrap_2_zoom.png


BIN
Results/wrap_3.png


BIN
Results/wrap_4.png


BIN
flow_rand_2.pdf


BIN
flow_recuit.pdf


BIN
insight.pdf


+ 125 - 38
main.tex

@@ -31,23 +31,72 @@
 
 \section{Introduction}
 
-\section{General architecture of the tool-set}
-   Big pipeline + pool + blabla\medskip
+\section{General architecture of the tool}
+
+The testing tool is aimed to be modular: it is made of independents blocks that
+are interfaced trough a scheduler. More precisely a master wrapper is written
+in Python that calls a first layer which performs the chosen heuristic. This
+layer is written in C++ for performances. The given discrepancy algorithm 
+--- written in C --- is called when evaluations of a state is needed.
+The wrapper dispatch the computations on the multi-core architecture of 
+modern computers\footnote{for us, between 2 and 4 physical cores and 4 or 8 
+virtual cores}. This basic architecture is described in figure~\ref{main_flow}.
+Experiments were conducted on two machines: 
+\begin{itemize}
+  \item 2.4 GHz Intel Dual Core i5 hyper-threaded to 2.8GHz, 8 Go 1600 MHz DDR3.
+  \item 2.8 GHz Intel Quad Core i7 hyper-threaded to 3.1GHz, 8 Go 1600 MHz DDR3.
+\end{itemize}
+
+\begin{figure}
+  \label{main_flow}
+\includegraphics[scale=0.6]{main_flow.pdf}
+\caption{Tool overview}
+\end{figure}
+
+On these machines, some basic profiling has make clear that 
+the main bottleneck of the computations is hiding in the \emph{computation
+of the discrepency}. The chosen algorithm and implantation of this 
+cost function is the DEM-algorithm of \emph{Magnus Wahlstr\o m}.\medskip
+
+All the experiments has been conducted on dimension 2,3,4 
+--- with a fixed Halton basis 7, 13, 29, 3 ---. Some minor tests have
+been made in order to discuss the dependency of the discrepency and 
+efficiency of the heuristics with regards to the values chosen for the
+prime base. The average results remains roughly identical when taking 
+changing these primes and taking them in the range [2, 100]. For such
+a reason we decided to pursue the full computations with a fixed 
+basis.
 
-   Un truc bien ca serait d'avoir un truc modulaire (genre les heuristiques 
-   sont des "blocs" et l'outil appelle un bloc quand il veut faire son test
-   en l'appelant en multicore" 
 
-   (c'est stupide mais ca fera un beau schéma!)
+\subsection{Algorithmic insights}
 
+To perform an experiment we made up a 
+loop above the main algorithm which calls the chosen heuristic multiple 
+times in order to smooth up the results and obtain more exploitable datas.
+Then an arithmetic mean of the result is performed on the values. In addition
+extremal values are also given in order to construct error bands graphs.
+
+A flowchart of the conduct of one experiment is described in the 
+flowchart~\ref{insight_flow}. The number of iteration of the heuristic is 
+I and the number of full restart is N. Th efunction Heuristic() correspond to
+a single step of the chosen heursitic. We now present an in-depth view of
+the implemented heuristics.
+
+\begin{figure}
+ \begin{mdframed}
+  \label{insight_flow}
+\includegraphics[scale=0.4]{insight.pdf}
+\caption{Flowchart of a single experiment}
+\end{mdframed}
+\end{figure}
 
 
-\section{Heuristics devlopped}
+\section{Heuristics developed}
 
 \subsection{Fully random search (Test case)}
  The first heuristic implemented is rge random search. We generates
  random sets of Halton points and select the best set with regard to its
- discrepancy iteratively. The process is wrapped up in the following 
+ discrepancy iteratively. The process is wrapped up in the 
  flowchart~\ref{rand_flow}. In order to generate at each step a random 
  permutation, we transform it directly from the previous one.
   More precisely the permutation is a singleton object which have method 
@@ -107,60 +156,98 @@ the naive implementation.
 
 \subsubsection{Results and stability}
 
-We first want to analyse the dependence of the results on the number of 
-iterations of the algorithm. To perform such an experiment we made up a 
-wrapper above the main algorithm which calls the random search on 
-different number of iterations. To smooth up the results and obtain
-more exploitable datas, we also perform an 
-arithmetic mean of fifteen searches for each expermiement. The flowchart of
-the conducts of this experiment is descibed in the figure:
+We first want to analyze the dependence of the results on the number of 
+iterations of the heuristic, in order to discuss its stability. 
+The results are compiled in the figures~\ref{rand_iter2}\ref{rand_iter3}.
+As expected from a fully random search, the error bands are very large for 
+low number of iterations ($15\%$ of the value for 200 iterations) and tends
+to shrink with a bigger number of iterations (arround $5\%$ for 1600 iterations).
+The average results are quite stable, they decrease progressively with 
+the growing number of iterations, but seems to get to a limits after 1000 iterations. This value acts as a threshold for the interesting number of iterations.
+As such interesting results can be conducted with \emph{only} 1000 iterations, 
+without alterating too much the quality of the set with regards to its
+discrepency and this heuristic.
+
+\begin{figure}
+  \label{rand_iter2}
+\includegraphics[scale=0.3]{Results/random_iter.png}
+\caption{Dependence on iterations number: D=2}
+\end{figure}
+\begin{figure}
+  \label{rand_iter3}
+\includegraphics[scale=0.3]{Results/random_iter_3.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+
 
+
+\subsection{Evolutionary heuristic: Simulated annealing and local search}
 \begin{figure}
  \begin{mdframed}
   \label{rand_flow}
-\includegraphics[scale=0.4]{flow_rand_2.pdf}
-\caption{Flowchart of the random search experiement for dependence on iterations}
+\includegraphics[scale=0.4]{flow_recuit.pdf}
+\caption{Flowchart of the simulated annealing local search heuristic}
 \end{mdframed}
 \end{figure}
 
-The results are compiled in the figure
+\subsubsection{Dependence on the temperature}
+
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/resu_temp3.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+
 \begin{figure}
   \label{rand_flow}
-\includegraphics[scale=0.6]{rand_res.png}
-\caption{Dependence on iterations number: D=2}
+\includegraphics[scale=0.3]{Results/resu_temp3_zoom.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/resu_2_temp.png}
+\caption{Dependence on iterations number: D=3}
 \end{figure}
 
-The same experiment has been conducted on dimension 4 -- with Halton basis
-7, 13, 29, 3 ---:
+\subsubsection{Stability with regards to the number of iterations}
+
 \begin{figure}
   \label{rand_flow}
-\includegraphics[scale=0.6]{rand_search_4.png}
-\caption{Dependence on iterations number: D=4}
+\includegraphics[scale=0.3]{Results/sa_iter.png}
+\caption{Dependence on iterations number: D=3}
 \end{figure}
 
+\subsection{Genetic (5+5) search}
+\begin{figure}
+ \begin{mdframed}
+  \label{rand_flow}
+\includegraphics[scale=0.4]{flow_recuit.pdf}
+\caption{Flowchart of the simulated annealing local search heuristic}
+\end{mdframed}
+\end{figure}
 
-The same experiment has been conducted on dimension 6 -- with Halton basis
-7, 13, 29, 3, 11, 31---:
 \begin{figure}
   \label{rand_flow}
-\includegraphics[scale=0.6]{rand_search_4.png}
-\caption{Dependence on iterations number D=6}
+\includegraphics[scale=0.3]{Results/res_gen_2.png}
+\caption{Dependence on iterations number: D=3}
 \end{figure}
 
-Based on the same wrapper, we also experiments the dependence on the number
-of points, in dimension 2, 4, 6.
 \begin{figure}
   \label{rand_flow}
-\includegraphics[scale=0.6]{low_discr_rand.png}
-\caption{Dependence on iterations number}
+\includegraphics[scale=0.3]{Results/res_gen_2_zoom.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/res_gen_3_zoom.png}
+\caption{Dependence on iterations number: D=3}
 \end{figure}
 
-\subsection{Local Search}
-  Blabla+Pipeline
-\subsection{Evolutionary heuristics}
-  Blabla+Pipeline
-\subsection{Genetic heuristics}
-  Blabla+Pipeline
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/res_gen_4_zoom.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
 
 \section{Results}
 

+ 227 - 0
main.tex.bak

@@ -0,0 +1,227 @@
+% ------------------------------------------------------------------------
+\documentclass{llncs}
+\input{prelude}
+\begin{document} 
+\title{Star Discrepancies for generalized Halton points}
+% \titlerunning{}  % abbreviated title (for running head)
+%                                     also used for the TOC unless
+%                                     \toctitle is used
+
+\author{Thomas Espitau\inst{1} \and Olivier Marty\inst{1}} 
+%
+% \authorrunning{} % abbreviated author list (for running head)
+%
+%%%% list of authors for the TOC (use if author list has to be modified)
+% \tocauthor{}
+%
+\institute{
+  $\mbox{}^1$ ENS Cachan \qquad
+}
+
+\maketitle
+
+\makeatletter
+
+\makeatother
+
+
+\begin{abstract}
+\end{abstract}
+
+
+\section{Introduction}
+
+\section{General architecture of the tool}
+
+The testing tool is aimed to be modular: it is made of independant blocks that
+are interfaced trough a scheduler. More precisely a master wrapper is written
+in Python that calls a first layer which performs the chosen heuristic. This
+layer is written in C++ for performences. The given discrepancy algorithm 
+--- written in C --- is called when evaluations of a state is needed.
+The wrapper dispatch the computations on the multi-core architecture of 
+modern computers\footnote{for us, between 2 and 4 physical cores and 4 or 8 
+virtual cores}. This basic architecture is described in figure~\ref{main_flow}.
+Experiments were conducted on two machines: 
+\begin{itemize}
+  \item 2.4 GHz Intel Dual Core i5 hyperthreaded to 2.8GHz, 8 Go 1600 MHz DDR3.
+  \item 2.8 GHz Intel Quad Core i7 hyperthreaded to 3.1GHz, 8 Go 1600 MHz DDR3.
+\end{itemize}
+
+\begin{figure}
+  \label{main_flow}
+\includegraphics[scale=0.6]{main_flow.pdf}
+\caption{Tool overview}
+\end{figure}
+
+
+\subsection{Algorithmics insights}
+
+\begin{figure}
+ \begin{mdframed}
+  \label{rand_flow}
+\includegraphics[scale=0.4]{flow_rand_2.pdf}
+\caption{Flowchart of the experiement for dependence on iterations}
+\end{mdframed}
+\end{figure}
+
+
+\section{Heuristics devlopped}
+
+\subsection{Fully random search (Test case)}
+ The first heuristic implemented is rge random search. We generates
+ random sets of Halton points and select the best set with regard to its
+ discrepancy iteratively. The process is wrapped up in the following 
+ flowchart~\ref{rand_flow}. In order to generate at each step a random 
+ permutation, we transform it directly from the previous one.
+  More precisely the permutation is a singleton object which have method 
+  random, built on the Knuth Fisher Yates shuffle. This algorithm allows
+  us to generate an uniformly chosen  permutation at each step. We recall 
+  this fact and detail the algorithm in the following section.
+\begin{figure}
+ \begin{mdframed}
+  \label{rand_flow}
+\includegraphics[scale=0.4]{flow_rand.pdf}
+\caption{Flowchart of the random search}
+\end{mdframed}
+\end{figure}
+
+
+  \subsubsection{The Knuth-Fisher-Yates shuffle}
+
+The Fisher–Yates shuffle is an algorithm for generating a random permutation 
+of a finite sets. The Fisher–Yates shuffle is unbiased, so that every 
+permutation is equally likely. We present here the Durstenfeld variant of 
+the algorithm, presented by Knuth in \emph{The Art of Computer programming}.
+The algorithm's time complexity is here $O(n)$, compared to $O(n^2)$ of 
+the naive implementation.
+
+\begin{algorithm}[H]
+  \SetAlgoLined
+  \SetKwFunction{Rand}{Rand}
+  \SetKwFunction{Swap}{Swap}
+  \KwData{A table T[1..n]}
+  \KwResult{Same table T, shuffled}
+  \For{$i\leftarrow 1$ \KwTo $n-1$}{
+     $j \leftarrow$ \Rand{$[1,n-i]$}\;
+     \Swap{$T[i], T[i+j]$}\;
+    }
+  \caption{KFY algorithm}
+\end{algorithm}
+
+
+\begin{lemma}
+  The resulting permutation of KFY is unbiased.
+\end{lemma}
+\begin{proof}
+  Let consider the set $[1,\ldots n]$ as the vertices of a random graph 
+  constructed as the trace of the execution of the algorithm: 
+  an edge $(i,j)$ exists in the graph if and only if the swap of $T[i]$ and
+  $T[j]$ had been executed. This graph encodes the permutation represented by
+  $T$. To be able to encode any permutation the considered graph must be 
+  connected --- in order to allow any pairs of points to be swapped ---.
+  Since by construction every points is reached by an edge, and that there 
+  exists exactly $n-1$ edges, we can conclude directly that any permutation can
+  be reached by the algorithm. Since the probability of getting a fixed graph 
+  of $n-1$ edges with every edges of degree at least one is $n!^{-1}$, the 
+  algorithm is thus unbiased.
+
+\end{proof}
+
+
+\subsubsection{Results and stability}
+
+We first want to analyse the dependence of the results on the number of 
+iterations of the algorithm. To perform such an experiment we made up a 
+wrapper above the main algorithm which calls the random search on 
+different number of iterations. To smooth up the results and obtain
+more exploitable datas, we also perform an 
+arithmetic mean of fifteen searches for each experiments. The flowchart of
+the conducts of this experiment is desibed in the figure:
+
+The results are compiled in the figure
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/random_iter.png}
+\caption{Dependence on iterations number: D=2}
+\end{figure}
+
+The sae experiment has been conducted on dimension 4 -- with Halton basis
+7, 13, 29, 3 ---:
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/random_iter_3.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+
+
+
+\subsection{Evolutionary heuristic: Simmulated annealing and local search}
+\begin{figure}
+ \begin{mdframed}
+  \label{rand_flow}
+\includegraphics[scale=0.4]{flow_recuit.pdf}
+\caption{Flowchart of the simulated annealing local search heuristic}
+\end{mdframed}
+\end{figure}
+
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/resu_temp3.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/resu_temp3_zoom.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/resu_2_temp.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/sa_iter.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+
+\subsection{Genetic (5+5) search}
+\begin{figure}
+ \begin{mdframed}
+  \label{rand_flow}
+\includegraphics[scale=0.4]{flow_recuit.pdf}
+\caption{Flowchart of the simulated annealing local search heuristic}
+\end{mdframed}
+\end{figure}
+
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/res_gen_2.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/res_gen_2_zoom.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/res_gen_3_zoom.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+
+\begin{figure}
+  \label{rand_flow}
+\includegraphics[scale=0.3]{Results/res_gen_4_zoom.png}
+\caption{Dependence on iterations number: D=3}
+\end{figure}
+
+\section{Results}
+
+
+\section{Conclusion}
+
+\end{document}

BIN
main_flow.pdf


BIN
rand_search_4.png


BIN
src/.main.cpp.swp


BIN
src/.wrapper_temp.py.swp


+ 2 - 4
src/ploter.py

@@ -13,12 +13,10 @@ def errorfill(x, y, yerr, color=None, alpha_fill=0.3, ax=None):
 
 
 
-from out_gen_4 import *
+from res import *
 
 errorfill(axis[0], resu[0], resu_bars[0])
 errorfill(axis[0], resu[1], resu_bars[1])
-errorfill(axis[0], resu[2], resu_bars[2])
-errorfill(axis[0], resu[3], resu_bars[3])
-errorfill(axis[0], resu[4], resu_bars[4])
+errorfill(axis[2], resu[2], resu_bars[2])
 
 plt.show()

+ 180 - 585
src/random_search

@@ -1,585 +1,180 @@
-0.571429	0.692308
-0.285714	0.846154
-0.714286	0.153846
-0.142857	0.538462
-0.857143	0.384615
-0.428571	0.076923
-0.081633	0.461538
-0.653061	0.307692
-0.367347	0.923077
-0.795918	0.230769
-0.224490	0.615385
-0.938776	0.769231
-0.510204	0.053254
-0.040816	0.745562
-0.612245	0.899408
-0.326531	0.207101
-0.755102	0.591716
-0.183673	0.437870
-0.897959	0.130178
-0.469388	0.514793
-0.102041	0.360947
-0.673469	0.976331
-0.387755	0.284024
-0.816327	0.668639
-0.244898	0.822485
-0.959184	0.065089
-0.530612	0.757396
-0.020408	0.911243
-0.591837	0.218935
-0.306122	0.603550
-0.734694	0.449704
-0.163265	0.142012
-0.877551	0.526627
-0.448980	0.372781
-0.122449	0.988166
-0.693878	0.295858
-0.408163	0.680473
-0.836735	0.834320
-0.265306	0.011834
-0.979592	0.704142
-0.551020	0.857988
-0.061224	0.165680
-0.632653	0.550296
-0.346939	0.396450
-0.775510	0.088757
-0.204082	0.473373
-0.918367	0.319527
-0.489796	0.934911
-0.011662	0.242604
-0.583090	0.627219
-0.297376	0.781065
-0.725948	0.041420
-0.154519	0.733728
-0.868805	0.887574
-0.440233	0.195266
-0.093294	0.579882
-0.664723	0.426036
-0.379009	0.118343
-0.807580	0.502959
-0.236152	0.349112
-0.950437	0.964497
-0.521866	0.272189
-0.052478	0.656805
-0.623907	0.810651
-0.338192	0.029586
-0.766764	0.721893
-0.195335	0.875740
-0.909621	0.183432
-0.481050	0.568047
-0.113703	0.414201
-0.685131	0.106509
-0.399417	0.491124
-0.827988	0.337278
-0.256560	0.952663
-0.970845	0.260355
-0.542274	0.644970
-0.032070	0.798817
-0.603499	0.005917
-0.317784	0.698225
-0.746356	0.852071
-0.174927	0.159763
-0.889213	0.544379
-0.460641	0.390533
-0.134111	0.082840
-0.705539	0.467456
-0.419825	0.313609
-0.848397	0.928994
-0.276968	0.236686
-0.991254	0.621302
-0.562682	0.775148
-0.072886	0.035503
-0.644315	0.727811
-0.358601	0.881657
-0.787172	0.189349
-0.215743	0.573964
-0.930029	0.420118
-0.501458	0.112426
-0.005831	0.497041
-0.577259	0.343195
-0.291545	0.958580
-0.720117	0.266272
-0.148688	0.650888
-0.862974	0.804734
-0.434402	0.023669
-0.087464	0.715976
-0.658892	0.869822
-0.373178	0.177515
-0.801749	0.562130
-0.230321	0.408284
-0.944606	0.100592
-0.516035	0.485207
-0.046647	0.331361
-0.618076	0.946746
-0.332362	0.254438
-0.760933	0.639053
-0.189504	0.792899
-0.903790	0.071006
-0.475219	0.763314
-0.107872	0.917160
-0.679300	0.224852
-0.393586	0.609467
-0.822157	0.455621
-0.250729	0.147929
-0.965015	0.532544
-0.536443	0.378698
-0.026239	0.994083
-0.597668	0.301775
-0.311953	0.686391
-0.740525	0.840237
-0.169096	0.017751
-0.883382	0.710059
-0.454810	0.863905
-0.128280	0.171598
-0.699708	0.556213
-0.413994	0.402367
-0.842566	0.094675
-0.271137	0.479290
-0.985423	0.325444
-0.556851	0.940828
-0.067055	0.248521
-0.638484	0.633136
-0.352770	0.786982
-0.781341	0.047337
-0.209913	0.739645
-0.924198	0.893491
-0.495627	0.201183
-0.014577	0.585799
-0.586006	0.431953
-0.300292	0.124260
-0.728863	0.508876
-0.157434	0.355030
-0.871720	0.970414
-0.443149	0.278107
-0.096210	0.662722
-0.667638	0.816568
-0.381924	0.059172
-0.810496	0.751479
-0.239067	0.905325
-0.953353	0.213018
-0.524781	0.597633
-0.055394	0.443787
-0.626822	0.136095
-0.341108	0.520710
-0.769679	0.366864
-0.198251	0.982249
-0.912536	0.289941
-0.483965	0.674556
-0.116618	0.828402
-0.688047	0.004096
-0.402332	0.696404
-0.830904	0.850250
-0.259475	0.157943
-0.973761	0.542558
-0.545190	0.388712
-0.034985	0.081020
-0.606414	0.465635
-0.320700	0.311789
-0.749271	0.927173
-0.177843	0.234866
-0.892128	0.619481
-0.463557	0.773327
-0.137026	0.057351
-0.708455	0.749659
-0.422741	0.903505
-0.851312	0.211197
-0.279883	0.595812
-0.994169	0.441966
-0.565598	0.134274
-0.075802	0.518889
-0.647230	0.365043
-0.361516	0.980428
-0.790087	0.288120
-0.218659	0.672736
-0.932945	0.826582
-0.504373	0.069185
-0.002915	0.761493
-0.574344	0.915339
-0.288630	0.223031
-0.717201	0.607647
-0.145773	0.453801
-0.860058	0.146108
-0.431487	0.530724
-0.084548	0.376878
-0.655977	0.992262
-0.370262	0.299954
-0.798834	0.684570
-0.227405	0.838416
-0.941691	0.015931
-0.513120	0.708239
-0.043732	0.862085
-0.615160	0.169777
-0.329446	0.554392
-0.758017	0.400546
-0.186589	0.092854
-0.900875	0.477469
-0.472303	0.323623
-0.104956	0.939008
-0.676385	0.246700
-0.390671	0.631315
-0.819242	0.785162
-0.247813	0.045517
-0.962099	0.737824
-0.533528	0.891670
-0.023324	0.199363
-0.594752	0.583978
-0.309038	0.430132
-0.737609	0.122440
-0.166181	0.507055
-0.880466	0.353209
-0.451895	0.968594
-0.125364	0.276286
-0.696793	0.660901
-0.411079	0.814747
-0.839650	0.033682
-0.268222	0.725990
-0.982507	0.879836
-0.553936	0.187528
-0.064140	0.572144
-0.635569	0.418298
-0.349854	0.110605
-0.778426	0.495221
-0.206997	0.341375
-0.921283	0.956759
-0.492711	0.264452
-0.017493	0.649067
-0.588921	0.802913
-0.303207	0.010014
-0.731778	0.702321
-0.160350	0.856168
-0.874636	0.163860
-0.446064	0.548475
-0.099125	0.394629
-0.670554	0.086937
-0.384840	0.471552
-0.813411	0.317706
-0.241983	0.933091
-0.956268	0.240783
-0.527697	0.625398
-0.058309	0.779244
-0.629738	0.039599
-0.344023	0.731907
-0.772595	0.885753
-0.201166	0.193446
-0.915452	0.578061
-0.486880	0.424215
-0.119534	0.116523
-0.690962	0.501138
-0.405248	0.347292
-0.833819	0.962676
-0.262391	0.270369
-0.976676	0.654984
-0.548105	0.808830
-0.037901	0.027765
-0.609329	0.720073
-0.323615	0.873919
-0.752187	0.181611
-0.180758	0.566227
-0.895044	0.412381
-0.466472	0.104688
-0.139942	0.489304
-0.711370	0.335457
-0.425656	0.950842
-0.854227	0.258534
-0.282799	0.643150
-0.997085	0.796996
-0.568513	0.075102
-0.078717	0.767410
-0.650146	0.921256
-0.364431	0.228949
-0.793003	0.613564
-0.221574	0.459718
-0.935860	0.152025
-0.507289	0.536641
-0.008746	0.382795
-0.580175	0.998179
-0.294461	0.305872
-0.723032	0.690487
-0.151603	0.844333
-0.865889	0.021848
-0.437318	0.714156
-0.090379	0.868002
-0.661808	0.175694
-0.376093	0.560310
-0.804665	0.406463
-0.233236	0.098771
-0.947522	0.483386
-0.518950	0.329540
-0.049563	0.944925
-0.620991	0.252617
-0.335277	0.637233
-0.763848	0.791079
-0.192420	0.051434
-0.906706	0.743741
-0.478134	0.897588
-0.110787	0.205280
-0.682216	0.589895
-0.396501	0.436049
-0.825073	0.128357
-0.253644	0.512972
-0.967930	0.359126
-0.539359	0.974511
-0.029155	0.282203
-0.600583	0.666818
-0.314869	0.820665
-0.743440	0.063268
-0.172012	0.755576
-0.886297	0.909422
-0.457726	0.217114
-0.131195	0.601730
-0.702624	0.447883
-0.416910	0.140191
-0.845481	0.524807
-0.274052	0.370960
-0.988338	0.986345
-0.559767	0.294037
-0.069971	0.678653
-0.641399	0.832499
-0.355685	0.005007
-0.784257	0.697315
-0.212828	0.851161
-0.927114	0.158853
-0.498542	0.543468
-0.001666	0.389622
-0.573095	0.081930
-0.287380	0.466545
-0.715952	0.312699
-0.144523	0.928084
-0.858809	0.235776
-0.430237	0.620391
-0.083299	0.774238
-0.654727	0.058261
-0.369013	0.750569
-0.797584	0.904415
-0.226156	0.212107
-0.940441	0.596723
-0.511870	0.442877
-0.042482	0.135184
-0.613911	0.519800
-0.328197	0.365954
-0.756768	0.981338
-0.185339	0.289030
-0.899625	0.673646
-0.471054	0.827492
-0.103707	0.070096
-0.675135	0.762403
-0.389421	0.916249
-0.817993	0.223942
-0.246564	0.608557
-0.960850	0.454711
-0.532278	0.147019
-0.022074	0.531634
-0.593503	0.377788
-0.307788	0.993173
-0.736360	0.300865
-0.164931	0.685480
-0.879217	0.839326
-0.450646	0.016841
-0.124115	0.709149
-0.695544	0.862995
-0.409829	0.170687
-0.838401	0.555303
-0.266972	0.401457
-0.981258	0.093764
-0.552686	0.478380
-0.062890	0.324533
-0.634319	0.939918
-0.348605	0.247610
-0.777176	0.632226
-0.205748	0.786072
-0.920033	0.046427
-0.491462	0.738735
-0.013328	0.892581
-0.584756	0.200273
-0.299042	0.584888
-0.727613	0.431042
-0.156185	0.123350
-0.870471	0.507965
-0.441899	0.354119
-0.094960	0.969504
-0.666389	0.277196
-0.380675	0.661812
-0.809246	0.815658
-0.237818	0.034593
-0.952103	0.726900
-0.523532	0.880746
-0.054144	0.188439
-0.625573	0.573054
-0.339858	0.419208
-0.768430	0.111516
-0.197001	0.496131
-0.911287	0.342285
-0.482716	0.957670
-0.115369	0.265362
-0.686797	0.649977
-0.401083	0.803823
-0.829654	0.010924
-0.258226	0.703232
-0.972511	0.857078
-0.543940	0.164770
-0.033736	0.549386
-0.605165	0.395539
-0.319450	0.087847
-0.748022	0.472462
-0.176593	0.318616
-0.890879	0.934001
-0.462307	0.241693
-0.135777	0.626309
-0.707205	0.780155
-0.421491	0.040510
-0.850062	0.732817
-0.278634	0.886664
-0.992920	0.194356
-0.564348	0.578971
-0.074552	0.425125
-0.645981	0.117433
-0.360267	0.502048
-0.788838	0.348202
-0.217409	0.963587
-0.931695	0.271279
-0.503124	0.655894
-0.007497	0.809741
-0.578925	0.028675
-0.293211	0.720983
-0.721783	0.874829
-0.150354	0.182522
-0.864640	0.567137
-0.436068	0.413291
-0.089130	0.105599
-0.660558	0.490214
-0.374844	0.336368
-0.803415	0.951752
-0.231987	0.259445
-0.946272	0.644060
-0.517701	0.797906
-0.048313	0.076013
-0.619742	0.768320
-0.334027	0.922167
-0.762599	0.229859
-0.191170	0.614474
-0.905456	0.460628
-0.476885	0.152936
-0.109538	0.537551
-0.680966	0.383705
-0.395252	0.999090
-0.823823	0.306782
-0.252395	0.691397
-0.966681	0.845244
-0.538109	0.022758
-0.027905	0.715066
-0.599334	0.868912
-0.313619	0.176604
-0.742191	0.561220
-0.170762	0.407374
-0.885048	0.099681
-0.456476	0.484297
-0.129946	0.330451
-0.701374	0.945835
-0.415660	0.253528
-0.844232	0.638143
-0.272803	0.791989
-0.987089	0.052344
-0.558517	0.744652
-0.068721	0.898498
-0.640150	0.206190
-0.354436	0.590806
-0.783007	0.436959
-0.211579	0.129267
-0.925864	0.513883
-0.497293	0.360036
-0.016243	0.975421
-0.587672	0.283113
-0.301958	0.667729
-0.730529	0.821575
-0.159100	0.064178
-0.873386	0.756486
-0.444815	0.910332
-0.097876	0.218025
-0.669304	0.602640
-0.383590	0.448794
-0.812162	0.141102
-0.240733	0.525717
-0.955019	0.371871
-0.526447	0.987255
-0.057060	0.294948
-0.628488	0.679563
-0.342774	0.833409
-0.771345	0.000910
-0.199917	0.693218
-0.914202	0.847064
-0.485631	0.154756
-0.118284	0.539372
-0.689713	0.385526
-0.403998	0.077833
-0.832570	0.462449
-0.261141	0.308603
-0.975427	0.923987
-0.546855	0.231680
-0.036651	0.616295
-0.608080	0.770141
-0.322366	0.054165
-0.750937	0.746472
-0.179509	0.900319
-0.893794	0.208011
-0.465223	0.592626
-0.138692	0.438780
-0.710121	0.131088
-0.424406	0.515703
-0.852978	0.361857
-0.281549	0.977242
-0.995835	0.284934
-0.567264	0.669549
-0.077468	0.823396
-0.648896	0.065999
-0.363182	0.758307
-0.791753	0.912153
-0.220325	0.219845
-0.934611	0.604461
-0.506039	0.450614
-0.004581	0.142922
-0.576010	0.527538
-0.290296	0.373691
-0.718867	0.989076
-0.147439	0.296768
-0.861724	0.681384
-0.433153	0.835230
-0.086214	0.012745
-0.657643	0.705052
-0.371928	0.858898
-0.800500	0.166591
-0.229071	0.551206
-0.943357	0.397360
-0.514786	0.089668
-0.045398	0.474283
-0.616826	0.320437
-0.331112	0.935822
-0.759683	0.243514
-0.188255	0.628129
-0.902541	0.781975
-0.473969	0.042330
-0.106622	0.734638
-0.678051	0.888484
-0.392337	0.196177
-0.820908	0.580792
-0.249479	0.426946
-0.963765	0.119254
-0.535194	0.503869
-0.024990	0.350023
-0.596418	0.965407
-0.310704	0.273100
-0.739275	0.657715
-0.167847	0.811561
-0.882132	0.030496
-0.453561	0.722804
-0.127030	0.876650
-0.698459	0.184342
-0.412745	0.568958
-0.841316	0.415112
-0.269888	0.107419
-0.984173	0.492035
-0.555602	0.338188
-0.065806	0.953573
-0.637234	0.261265
-0.351520	0.645881
-0.780092	0.799727
-0.208663	0.006827
+0.714286	0.153846	0.241379	0.333333
+0.857143	0.923077	0.344828	0.666667
+0.571429	0.769231	0.965517	0.111111
+0.428571	0.076923	0.827586	0.444444
+0.142857	0.615385	0.689655	0.777778
+0.285714	0.230769	0.068966	0.222222
+0.102041	0.538462	0.793103	0.555556
+0.816327	0.307692	0.275862	0.888889
+0.959184	0.692308	0.103448	0.037037
+0.673469	0.846154	0.413793	0.370370
+0.530612	0.461538	0.517241	0.703704
+0.244898	0.384615	0.655172	0.148148
+0.387755	0.011834	0.172414	0.481481
+0.122449	0.165680	0.620690	0.814815
+0.836735	0.934911	0.551724	0.259259
+0.979592	0.781065	0.482759	0.592593
+0.693878	0.088757	0.724138	0.925926
+0.551020	0.627219	0.137931	0.074074
+0.265306	0.242604	0.206897	0.407407
+0.408163	0.550296	0.379310	0.740741
+0.081633	0.319527	0.896552	0.185185
+0.795918	0.704142	0.586207	0.518519
+0.938776	0.857988	0.448276	0.851852
+0.653061	0.473373	0.862069	0.296296
+0.510204	0.396450	0.310345	0.629630
+0.224490	0.071006	0.034483	0.962963
+0.367347	0.224852	0.758621	0.012346
+0.061224	0.994083	0.931034	0.345679
+0.775510	0.840237	0.008323	0.679012
+0.918367	0.147929	0.249703	0.123457
+0.632653	0.686391	0.353151	0.456790
+0.489796	0.301775	0.973841	0.790123
+0.204082	0.609467	0.835910	0.234568
+0.346939	0.378698	0.697979	0.567901
+0.020408	0.763314	0.077289	0.901235
+0.734694	0.917160	0.801427	0.049383
+0.877551	0.532544	0.284185	0.382716
+0.591837	0.455621	0.111772	0.716049
+0.448980	0.059172	0.422117	0.160494
+0.163265	0.213018	0.525565	0.493827
+0.306122	0.982249	0.663496	0.827160
+0.040816	0.828402	0.180737	0.271605
+0.755102	0.136095	0.629013	0.604938
+0.897959	0.674556	0.560048	0.938272
+0.612245	0.289941	0.491082	0.086420
+0.469388	0.597633	0.732461	0.419753
+0.183673	0.366864	0.146254	0.753086
+0.326531	0.751479	0.215220	0.197531
+0.014577	0.905325	0.387634	0.530864
+0.728863	0.520710	0.904875	0.864198
+0.871720	0.443787	0.594530	0.308642
+0.586006	0.005917	0.456599	0.641975
+0.443149	0.159763	0.870392	0.975309
+0.157434	0.928994	0.318668	0.024691
+0.300292	0.775148	0.042806	0.358025
+0.116618	0.082840	0.766944	0.691358
+0.830904	0.621302	0.939358	0.135802
+0.973761	0.236686	0.011891	0.469136
+0.688047	0.544379	0.253270	0.802469
+0.545190	0.313609	0.356718	0.246914
+0.259475	0.698225	0.977408	0.580247
+0.402332	0.852071	0.839477	0.913580
+0.137026	0.467456	0.701546	0.061728
+0.851312	0.390533	0.080856	0.395062
+0.994169	0.047337	0.804994	0.728395
+0.708455	0.201183	0.287753	0.172840
+0.565598	0.970414	0.115339	0.506173
+0.279883	0.816568	0.425684	0.839506
+0.422741	0.124260	0.529132	0.283951
+0.096210	0.662722	0.667063	0.617284
+0.810496	0.278107	0.184304	0.950617
+0.953353	0.585799	0.632580	0.098765
+0.667638	0.355030	0.563615	0.432099
+0.524781	0.739645	0.494649	0.765432
+0.239067	0.893491	0.736029	0.209877
+0.381924	0.508876	0.149822	0.543210
+0.075802	0.431953	0.218787	0.876543
+0.790087	0.017751	0.391201	0.320988
+0.932945	0.171598	0.908442	0.654321
+0.647230	0.940828	0.598098	0.987654
+0.504373	0.786982	0.460166	0.004115
+0.218659	0.094675	0.873960	0.337449
+0.361516	0.633136	0.322235	0.670782
+0.034985	0.248521	0.046373	0.115226
+0.749271	0.556213	0.770511	0.448560
+0.892128	0.325444	0.942925	0.781893
+0.606414	0.710059	0.033294	0.226337
+0.463557	0.863905	0.274673	0.559671
+0.177843	0.479290	0.378121	0.893004
+0.320700	0.402367	0.998811	0.041152
+0.055394	0.041420	0.860880	0.374486
+0.769679	0.195266	0.722949	0.707819
+0.912536	0.964497	0.102259	0.152263
+0.626822	0.810651	0.826397	0.485597
+0.483965	0.118343	0.309156	0.818930
+0.198251	0.656805	0.136742	0.263374
+0.341108	0.272189	0.447087	0.596708
+0.017493	0.579882	0.550535	0.930041
+0.731778	0.349112	0.688466	0.078189
+0.874636	0.733728	0.205707	0.411523
+0.588921	0.887574	0.653983	0.744856
+0.446064	0.502959	0.585018	0.189300
+0.160350	0.426036	0.516052	0.522634
+0.303207	0.023669	0.757432	0.855967
+0.119534	0.177515	0.171225	0.300412
+0.833819	0.946746	0.240190	0.633745
+0.976676	0.792899	0.412604	0.967078
+0.690962	0.100592	0.929845	0.016461
+0.548105	0.639053	0.619501	0.349794
+0.262391	0.254438	0.481570	0.683128
+0.405248	0.562130	0.895363	0.127572
+0.139942	0.331361	0.343639	0.460905
+0.854227	0.715976	0.067776	0.794239
+0.997085	0.869822	0.791914	0.238683
+0.711370	0.485207	0.964328	0.572016
+0.568513	0.408284	0.028537	0.905350
+0.282799	0.053254	0.269917	0.053498
+0.425656	0.207101	0.373365	0.386831
+0.099125	0.976331	0.994055	0.720165
+0.813411	0.822485	0.856124	0.164609
+0.956268	0.130178	0.718193	0.497942
+0.670554	0.668639	0.097503	0.831276
+0.527697	0.284024	0.821641	0.275720
+0.241983	0.591716	0.304400	0.609053
+0.384840	0.360947	0.131986	0.942387
+0.078717	0.745562	0.442331	0.090535
+0.793003	0.899408	0.545779	0.423868
+0.935860	0.514793	0.683710	0.757202
+0.650146	0.437870	0.200951	0.201646
+0.507289	0.065089	0.649227	0.534979
+0.221574	0.218935	0.580262	0.868313
+0.364431	0.988166	0.511296	0.312757
+0.037901	0.834320	0.752675	0.646091
+0.752187	0.142012	0.166468	0.979424
+0.895044	0.680473	0.235434	0.028807
+0.609329	0.295858	0.407848	0.362140
+0.466472	0.603550	0.925089	0.695473
+0.180758	0.372781	0.614744	0.139918
+0.323615	0.757396	0.476813	0.473251
+0.058309	0.911243	0.890606	0.806584
+0.772595	0.526627	0.338882	0.251029
+0.915452	0.449704	0.063020	0.584362
+0.629738	0.035503	0.787158	0.917695
+0.486880	0.189349	0.959572	0.065844
+0.201166	0.958580	0.023781	0.399177
+0.344023	0.804734	0.265161	0.732510
+0.011662	0.112426	0.368609	0.176955
+0.725948	0.650888	0.989298	0.510288
+0.868805	0.266272	0.851367	0.843621
+0.583090	0.573964	0.713436	0.288066
+0.440233	0.343195	0.092747	0.621399
+0.154519	0.727811	0.816885	0.954733
+0.297376	0.881657	0.299643	0.102881
+0.113703	0.497041	0.127229	0.436214
+0.827988	0.420118	0.437574	0.769547
+0.970845	0.029586	0.541023	0.213992
+0.685131	0.183432	0.678954	0.547325
+0.542274	0.952663	0.196195	0.880658
+0.256560	0.798817	0.644471	0.325103
+0.399417	0.106509	0.575505	0.658436
+0.134111	0.644970	0.506540	0.991770
+0.848397	0.260355	0.747919	0.008230
+0.991254	0.568047	0.161712	0.341564
+0.705539	0.337278	0.230678	0.674897
+0.562682	0.721893	0.403092	0.119342
+0.276968	0.875740	0.920333	0.452675
+0.419825	0.491124	0.609988	0.786008
+0.093294	0.414201	0.472057	0.230453
+0.807580	0.000910	0.885850	0.563786
+0.950437	0.154756	0.334126	0.897119
+0.664723	0.923987	0.058264	0.045267
+0.521866	0.770141	0.782402	0.378601
+0.236152	0.077833	0.954816	0.711934
+0.379009	0.616295	0.002378	0.156379
+0.072886	0.231680	0.243757	0.489712
+0.787172	0.539372	0.347206	0.823045
+0.930029	0.308603	0.967895	0.267490
+0.644315	0.693218	0.829964	0.600823
+0.501458	0.847064	0.692033	0.934156
+0.215743	0.462449	0.071344	0.082305

+ 15 - 0
src/res.py

@@ -0,0 +1,15 @@
+axis = {}
+resu = {}
+resu_bars = {}
+
+axis[0] = [10, 35, 60, 85, 110, 135, 160, 185, 210, 235, 260, 285, 310, 335, 360, 385, 410, 435, 460, 485, 510, 535, 560, 585]
+
+resu[0] = [0.15759425, 0.0711236125, 0.05134156249999999, 0.0390685875, 0.0331956375, 0.0288086875, 0.024430225, 0.021376725, 0.02072995, 0.019567849999999998, 0.017386600000000002, 0.015916175, 0.0148845375, 0.01337815, 0.0131273, 0.013137049999999997, 0.013144300000000001, 0.012171425, 0.0113505125, 0.010869475, 0.010356049999999999, 0.010085835, 0.009914015, 0.009272236250000001]
+resu_bars[0] = [[0.150549, 0.0677936, 0.0499395, 0.0378914, 0.0303172, 0.0277087, 0.023808, 0.020197, 0.0203114, 0.0190932, 0.0159221, 0.0154047, 0.0142995, 0.012701, 0.012736, 0.0125738, 0.0125413, 0.0119133, 0.0108696, 0.0100868, 0.0100911, 0.00973054, 0.00944531, 0.00891835], [0.163736, 0.0755705, 0.0535663, 0.0399611, 0.0342608, 0.0295125, 0.0249018, 0.022085, 0.0210025, 0.020665, 0.0179264, 0.0168273, 0.0154222, 0.0139772, 0.0135822, 0.0139057, 0.0136913, 0.012347, 0.0121063, 0.0114255, 0.0106159, 0.0104747, 0.0102338, 0.009492]]
+
+resu[1] = [0.14346549999999997, 0.063527975, 0.0449627875, 0.0354477875, 0.03032755, 0.026171999999999997, 0.021464425, 0.018726562500000002, 0.018666375, 0.0175885375, 0.0160137625, 0.014683637499999999, 0.013641075, 0.0121541625, 0.0118645625, 0.011869374999999998, 0.0119366375, 0.011047575, 0.0107343, 0.0101043725, 0.009634827500000002, 0.00951271125, 0.0093187775, 0.008447855]
+resu_bars[1] = [[0.135949, 0.0596545, 0.0410539, 0.0333211, 0.0292958, 0.025134, 0.0205975, 0.0174456, 0.0179174, 0.0161364, 0.0155649, 0.0140873, 0.0130282, 0.0117326, 0.0114335, 0.0112842, 0.0115576, 0.0105935, 0.0103573, 0.00972104, 0.00913606, 0.00923783, 0.00905022, 0.00816088], [0.152277, 0.0666826, 0.0472668, 0.0371538, 0.031289, 0.0273385, 0.0232342, 0.0202973, 0.0192605, 0.0190214, 0.0166344, 0.015149, 0.0141033, 0.0128459, 0.0121629, 0.0123784, 0.0125261, 0.0115158, 0.0112177, 0.010299, 0.00996569, 0.00970477, 0.00948486, 0.0088026]]
+
+axis[2] = [10, 35, 60, 85, 110, 135, 160, 185, 210, 235, 260, 285, 310, 335, 360, 385, 410, 435, 460, 485]
+resu[2] = [0.14120353333333335, 0.06548479333333333, 0.046063273333333335, 0.03528975333333333, 0.03027759333333333, 0.025914746666666665, 0.02187073333333334, 0.018703586666666664, 0.018072253333333333, 0.017285793333333337, 0.015746586666666666, 0.014146433333333331, 0.01340750666666667, 0.012070553333333333, 0.011922293333333332, 0.011630399999999997, 0.011643953333333335, 0.010854913333333332, 0.010259162666666665, 0.009978745999999998]
+resu_bars[2] = [[0.135949, 0.0608622, 0.0437328, 0.034098, 0.0291103, 0.0233957, 0.0206287, 0.0178056, 0.0161065, 0.0161443, 0.0150766, 0.0132946, 0.012501, 0.0113278, 0.011086, 0.0107817, 0.0106378, 0.0103302, 0.00955232, 0.00960693], [0.153533, 0.0715367, 0.0481157, 0.0377313, 0.0323401, 0.026981, 0.023421, 0.0198411, 0.019686, 0.0185712, 0.016576, 0.0150745, 0.014124, 0.0132404, 0.0124026, 0.012511, 0.0120181, 0.0114783, 0.0108302, 0.0101833]]

BIN
src/res.pyc


+ 1 - 1
src/res3

@@ -1 +1 @@
-0.0370089
+0.0332504

+ 1 - 1
src/res4

@@ -1 +1 @@
-0.0406788
+0.0486242

+ 1 - 0
src/res_genetic_2

@@ -0,0 +1 @@
+0.00979823

+ 1 - 0
src/res_genetic_3

@@ -0,0 +1 @@
+0.0331964

+ 1 - 0
src/res_genetic_4

@@ -0,0 +1 @@
+0.0473771

+ 1 - 0
src/res_genetic_i22

@@ -0,0 +1 @@
+0.0192831

+ 5 - 6
src/wrapper_final.py

@@ -17,7 +17,7 @@ def generate(dim, l, la = 0.992, init = 0.01, it = 1000):
     resu_bars_mini = []
     resu_bars_maxi = []
     NB_IT = 8
-    for i in range(10, 600, 25):
+    for i in range(80, 200, 25):
         results[i] = []
         axis.append(i)
         mini  =10
@@ -47,8 +47,8 @@ def gen_generate(dim, l, mu = 5, la = 5, c = 0.5):
     resu = []
     resu_bars_mini = []
     resu_bars_maxi = []
-    NB_IT = 15
-    for i in range(10, 600, 25):
+    NB_IT = 8
+    for i in range(80, 200, 25):
         results[i] = []
         axis.append(i)
         mini  =10
@@ -72,11 +72,10 @@ def gen_generate(dim, l, mu = 5, la = 5, c = 0.5):
 
     errorfill(axis, resu, resu_bars)
 
-dim = 3
+dim = 4
 generate(dim, 1, 0.99, 0.001, 1000)
 generate(dim, 2, 0.99, 0.001, 1000)
-gen_generate(dim, 3, 5, 5, 0.9)
+gen_generate(dim, 3, 5, 5, 0.6)
 
-errorfill(axis, resu, resu_bars)
 
 plt.show()

+ 1 - 1
src/wrapper_final3.py

@@ -72,7 +72,7 @@ def gen_generate(dim, l, mu = 5, la = 5, c = 0.5):
 
     errorfill(axis, resu, resu_bars)
 
-dim = 3
+dim = 4
 generate(dim, 1, 0.99, 0.001, 1000)
 generate(dim, 2, 0.99, 0.001, 1000)
 gen_generate(dim, 3, 5, 5, 0.9)

+ 54 - 0
src/wrapper_genetic_iter.py

@@ -0,0 +1,54 @@
+import os
+import matplotlib.pyplot as plt
+results = {}
+
+def errorfill(x, y, yerr, color=None, alpha_fill=0.3, ax=None):
+    ax = ax if ax is not None else plt.gca()
+    if color is None:
+        color = ax._get_lines.color_cycle.next()
+    ymin, ymax = yerr
+    ax.plot(x, y, color=color)
+    ax.fill_between(x, ymax, ymin, color=color, alpha=alpha_fill)
+
+
+
+def gen_generate(dim, l, mu = 5, la = 5, c = 0.5, iter=1000):
+    axis = []
+    resu = []
+    resu_bars_mini = []
+    resu_bars_maxi = []
+    NB_IT = 8
+    for i in range(80, 200, 25):
+        results[i] = []
+        axis.append(i)
+        mini  =10
+        maxi = 0
+        for j in range(NB_IT):
+            os.system('./main '+str(l)+" "+str(i)+ " " + str(dim) + " "+str(iter)+ " "+ str(mu)+ " "+ str(la)+ " " + str(c) + " > res_genetic_i2"+str(dim))
+            r = open("res_genetic_i2"+str(dim), "r")
+            res = float(r.readline())
+            mini = min(res, mini)
+            maxi = max(res, maxi)
+            results[i].append(res)
+        resu.append(sum(results[i])/NB_IT)
+        resu_bars_mini.append(mini)
+        resu_bars_maxi.append(maxi)
+
+    resu_bars = [resu_bars_mini, resu_bars_maxi]
+    print results
+    print axis
+    print resu
+    print resu_bars
+
+    errorfill(axis, resu, resu_bars)
+
+dim = 2
+gen_generate(dim, 3, 5, 5, 0.5, 200)
+gen_generate(dim, 3, 5, 5, 0.5, 600)
+gen_generate(dim, 3, 5, 5, 0.5,1000)
+gen_generate(dim, 3, 5, 5, 0.5, 1200)
+gen_generate(dim, 3, 5, 5, 0.5, 1400)
+
+errorfill(axis, resu, resu_bars)
+
+plt.show()