main.tex.bak 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. % ------------------------------------------------------------------------
  2. \documentclass{llncs}
  3. \input{prelude}
  4. \begin{document}
  5. \title{Star Discrepancies for generalized Halton points}
  6. % \titlerunning{} % abbreviated title (for running head)
  7. % also used for the TOC unless
  8. % \toctitle is used
  9. \author{Thomas Espitau\inst{1} \and Olivier Marty\inst{1}}
  10. %
  11. % \authorrunning{} % abbreviated author list (for running head)
  12. %
  13. %%%% list of authors for the TOC (use if author list has to be modified)
  14. % \tocauthor{}
  15. %
  16. \institute{
  17. $\mbox{}^1$ ENS Cachan \qquad
  18. }
  19. \maketitle
  20. \makeatletter
  21. \makeatother
  22. \begin{abstract}
  23. \end{abstract}
  24. \section{Introduction}
  25. \section{General architecture of the tool}
  26. The testing tool is aimed to be modular: it is made of independant blocks that
  27. are interfaced trough a scheduler. More precisely a master wrapper is written
  28. in Python that calls a first layer which performs the chosen heuristic. This
  29. layer is written in C++ for performences. The given discrepancy algorithm
  30. --- written in C --- is called when evaluations of a state is needed.
  31. The wrapper dispatch the computations on the multi-core architecture of
  32. modern computers\footnote{for us, between 2 and 4 physical cores and 4 or 8
  33. virtual cores}. This basic architecture is described in figure~\ref{main_flow}.
  34. Experiments were conducted on two machines:
  35. \begin{itemize}
  36. \item 2.4 GHz Intel Dual Core i5 hyperthreaded to 2.8GHz, 8 Go 1600 MHz DDR3.
  37. \item 2.8 GHz Intel Quad Core i7 hyperthreaded to 3.1GHz, 8 Go 1600 MHz DDR3.
  38. \end{itemize}
  39. \begin{figure}
  40. \label{main_flow}
  41. \includegraphics[scale=0.6]{main_flow.pdf}
  42. \caption{Tool overview}
  43. \end{figure}
  44. \subsection{Algorithmics insights}
  45. \begin{figure}
  46. \begin{mdframed}
  47. \label{rand_flow}
  48. \includegraphics[scale=0.4]{flow_rand_2.pdf}
  49. \caption{Flowchart of the experiement for dependence on iterations}
  50. \end{mdframed}
  51. \end{figure}
  52. \section{Heuristics devlopped}
  53. \subsection{Fully random search (Test case)}
  54. The first heuristic implemented is rge random search. We generates
  55. random sets of Halton points and select the best set with regard to its
  56. discrepancy iteratively. The process is wrapped up in the following
  57. flowchart~\ref{rand_flow}. In order to generate at each step a random
  58. permutation, we transform it directly from the previous one.
  59. More precisely the permutation is a singleton object which have method
  60. random, built on the Knuth Fisher Yates shuffle. This algorithm allows
  61. us to generate an uniformly chosen permutation at each step. We recall
  62. this fact and detail the algorithm in the following section.
  63. \begin{figure}
  64. \begin{mdframed}
  65. \label{rand_flow}
  66. \includegraphics[scale=0.4]{flow_rand.pdf}
  67. \caption{Flowchart of the random search}
  68. \end{mdframed}
  69. \end{figure}
  70. \subsubsection{The Knuth-Fisher-Yates shuffle}
  71. The Fisher–Yates shuffle is an algorithm for generating a random permutation
  72. of a finite sets. The Fisher–Yates shuffle is unbiased, so that every
  73. permutation is equally likely. We present here the Durstenfeld variant of
  74. the algorithm, presented by Knuth in \emph{The Art of Computer programming}.
  75. The algorithm's time complexity is here $O(n)$, compared to $O(n^2)$ of
  76. the naive implementation.
  77. \begin{algorithm}[H]
  78. \SetAlgoLined
  79. \SetKwFunction{Rand}{Rand}
  80. \SetKwFunction{Swap}{Swap}
  81. \KwData{A table T[1..n]}
  82. \KwResult{Same table T, shuffled}
  83. \For{$i\leftarrow 1$ \KwTo $n-1$}{
  84. $j \leftarrow$ \Rand{$[1,n-i]$}\;
  85. \Swap{$T[i], T[i+j]$}\;
  86. }
  87. \caption{KFY algorithm}
  88. \end{algorithm}
  89. \begin{lemma}
  90. The resulting permutation of KFY is unbiased.
  91. \end{lemma}
  92. \begin{proof}
  93. Let consider the set $[1,\ldots n]$ as the vertices of a random graph
  94. constructed as the trace of the execution of the algorithm:
  95. an edge $(i,j)$ exists in the graph if and only if the swap of $T[i]$ and
  96. $T[j]$ had been executed. This graph encodes the permutation represented by
  97. $T$. To be able to encode any permutation the considered graph must be
  98. connected --- in order to allow any pairs of points to be swapped ---.
  99. Since by construction every points is reached by an edge, and that there
  100. exists exactly $n-1$ edges, we can conclude directly that any permutation can
  101. be reached by the algorithm. Since the probability of getting a fixed graph
  102. of $n-1$ edges with every edges of degree at least one is $n!^{-1}$, the
  103. algorithm is thus unbiased.
  104. \end{proof}
  105. \subsubsection{Results and stability}
  106. We first want to analyse the dependence of the results on the number of
  107. iterations of the algorithm. To perform such an experiment we made up a
  108. wrapper above the main algorithm which calls the random search on
  109. different number of iterations. To smooth up the results and obtain
  110. more exploitable datas, we also perform an
  111. arithmetic mean of fifteen searches for each experiments. The flowchart of
  112. the conducts of this experiment is desibed in the figure:
  113. The results are compiled in the figure
  114. \begin{figure}
  115. \label{rand_flow}
  116. \includegraphics[scale=0.3]{Results/random_iter.png}
  117. \caption{Dependence on iterations number: D=2}
  118. \end{figure}
  119. The sae experiment has been conducted on dimension 4 -- with Halton basis
  120. 7, 13, 29, 3 ---:
  121. \begin{figure}
  122. \label{rand_flow}
  123. \includegraphics[scale=0.3]{Results/random_iter_3.png}
  124. \caption{Dependence on iterations number: D=3}
  125. \end{figure}
  126. \subsection{Evolutionary heuristic: Simmulated annealing and local search}
  127. \begin{figure}
  128. \begin{mdframed}
  129. \label{rand_flow}
  130. \includegraphics[scale=0.4]{flow_recuit.pdf}
  131. \caption{Flowchart of the simulated annealing local search heuristic}
  132. \end{mdframed}
  133. \end{figure}
  134. \begin{figure}
  135. \label{rand_flow}
  136. \includegraphics[scale=0.3]{Results/resu_temp3.png}
  137. \caption{Dependence on iterations number: D=3}
  138. \end{figure}
  139. \begin{figure}
  140. \label{rand_flow}
  141. \includegraphics[scale=0.3]{Results/resu_temp3_zoom.png}
  142. \caption{Dependence on iterations number: D=3}
  143. \end{figure}
  144. \begin{figure}
  145. \label{rand_flow}
  146. \includegraphics[scale=0.3]{Results/resu_2_temp.png}
  147. \caption{Dependence on iterations number: D=3}
  148. \end{figure}
  149. \begin{figure}
  150. \label{rand_flow}
  151. \includegraphics[scale=0.3]{Results/sa_iter.png}
  152. \caption{Dependence on iterations number: D=3}
  153. \end{figure}
  154. \subsection{Genetic (5+5) search}
  155. \begin{figure}
  156. \begin{mdframed}
  157. \label{rand_flow}
  158. \includegraphics[scale=0.4]{flow_recuit.pdf}
  159. \caption{Flowchart of the simulated annealing local search heuristic}
  160. \end{mdframed}
  161. \end{figure}
  162. \begin{figure}
  163. \label{rand_flow}
  164. \includegraphics[scale=0.3]{Results/res_gen_2.png}
  165. \caption{Dependence on iterations number: D=3}
  166. \end{figure}
  167. \begin{figure}
  168. \label{rand_flow}
  169. \includegraphics[scale=0.3]{Results/res_gen_2_zoom.png}
  170. \caption{Dependence on iterations number: D=3}
  171. \end{figure}
  172. \begin{figure}
  173. \label{rand_flow}
  174. \includegraphics[scale=0.3]{Results/res_gen_3_zoom.png}
  175. \caption{Dependence on iterations number: D=3}
  176. \end{figure}
  177. \begin{figure}
  178. \label{rand_flow}
  179. \includegraphics[scale=0.3]{Results/res_gen_4_zoom.png}
  180. \caption{Dependence on iterations number: D=3}
  181. \end{figure}
  182. \section{Results}
  183. \section{Conclusion}
  184. \end{document}