main.tex 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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 independents 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 performances. 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 hyper-threaded to 2.8GHz, 8 Go 1600 MHz DDR3.
  37. \item 2.8 GHz Intel Quad Core i7 hyper-threaded 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. On these machines, some basic profiling has make clear that
  45. the main bottleneck of the computations is hiding in the \emph{computation
  46. of the discrepency}. The chosen algorithm and implantation of this
  47. cost function is the DEM-algorithm of \emph{Magnus Wahlstr\o m}.\medskip
  48. All the experiments has been conducted on dimension 2,3,4
  49. --- with a fixed Halton basis 7, 13, 29, 3 ---. Some minor tests have
  50. been made in order to discuss the dependency of the discrepency and
  51. efficiency of the heuristics with regards to the values chosen for the
  52. prime base. The average results remains roughly identical when taking
  53. changing these primes and taking them in the range [2, 100]. For such
  54. a reason we decided to pursue the full computations with a fixed
  55. basis.
  56. \subsection{Algorithmic insights}
  57. To perform an experiment we made up a
  58. loop above the main algorithm which calls the chosen heuristic multiple
  59. times in order to smooth up the results and obtain more exploitable datas.
  60. Then an arithmetic mean of the result is performed on the values. In addition
  61. extremal values are also given in order to construct error bands graphs.
  62. A flowchart of the conduct of one experiment is described in the
  63. flowchart~\ref{insight_flow}. The number of iteration of the heuristic is
  64. I and the number of full restart is N. Th efunction Heuristic() correspond to
  65. a single step of the chosen heursitic. We now present an in-depth view of
  66. the implemented heuristics.
  67. \begin{figure}
  68. \begin{mdframed}
  69. \label{insight_flow}
  70. \includegraphics[scale=0.4]{insight.pdf}
  71. \caption{Flowchart of a single experiment}
  72. \end{mdframed}
  73. \end{figure}
  74. \section{Heuristics developed}
  75. \subsection{Fully random search (Test case)}
  76. The first heuristic implemented is rge random search. We generates
  77. random sets of Halton points and select the best set with regard to its
  78. discrepancy iteratively. The process is wrapped up in the
  79. flowchart~\ref{rand_flow}. In order to generate at each step a random
  80. permutation, we transform it directly from the previous one.
  81. More precisely the permutation is a singleton object which have method
  82. random, built on the Knuth Fisher Yates shuffle. This algorithm allows
  83. us to generate an uniformly chosen permutation at each step. We recall
  84. this fact and detail the algorithm in the following section.
  85. \begin{figure}
  86. \begin{mdframed}
  87. \label{rand_flow}
  88. \includegraphics[scale=0.4]{flow_rand.pdf}
  89. \caption{Flowchart of the random search}
  90. \end{mdframed}
  91. \end{figure}
  92. \subsubsection{The Knuth-Fisher-Yates shuffle}
  93. The Fisher–Yates shuffle is an algorithm for generating a random permutation
  94. of a finite sets. The Fisher–Yates shuffle is unbiased, so that every
  95. permutation is equally likely. We present here the Durstenfeld variant of
  96. the algorithm, presented by Knuth in \emph{The Art of Computer programming}.
  97. The algorithm's time complexity is here $O(n)$, compared to $O(n^2)$ of
  98. the naive implementation.
  99. \begin{algorithm}[H]
  100. \SetAlgoLined
  101. \SetKwFunction{Rand}{Rand}
  102. \SetKwFunction{Swap}{Swap}
  103. \KwData{A table T[1..n]}
  104. \KwResult{Same table T, shuffled}
  105. \For{$i\leftarrow 1$ \KwTo $n-1$}{
  106. $j \leftarrow$ \Rand{$[1,n-i]$}\;
  107. \Swap{$T[i], T[i+j]$}\;
  108. }
  109. \caption{KFY algorithm}
  110. \end{algorithm}
  111. \begin{lemma}
  112. The resulting permutation of KFY is unbiased.
  113. \end{lemma}
  114. \begin{proof}
  115. Let consider the set $[1,\ldots n]$ as the vertices of a random graph
  116. constructed as the trace of the execution of the algorithm:
  117. an edge $(i,j)$ exists in the graph if and only if the swap of $T[i]$ and
  118. $T[j]$ had been executed. This graph encodes the permutation represented by
  119. $T$. To be able to encode any permutation the considered graph must be
  120. connected --- in order to allow any pairs of points to be swapped ---.
  121. Since by construction every points is reached by an edge, and that there
  122. exists exactly $n-1$ edges, we can conclude directly that any permutation can
  123. be reached by the algorithm. Since the probability of getting a fixed graph
  124. of $n-1$ edges with every edges of degree at least one is $n!^{-1}$, the
  125. algorithm is thus unbiased.
  126. \end{proof}
  127. \subsubsection{Results and stability}
  128. We first want to analyze the dependence of the results on the number of
  129. iterations of the heuristic, in order to discuss its stability.
  130. The results are compiled in the figures~\ref{rand_iter2}\ref{rand_iter3}.
  131. As expected from a fully random search, the error bands are very large for
  132. low number of iterations ($15\%$ of the value for 200 iterations) and tends
  133. to shrink with a bigger number of iterations (arround $5\%$ for 1600 iterations).
  134. The average results are quite stable, they decrease progressively with
  135. 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.
  136. As such interesting results can be conducted with \emph{only} 1000 iterations,
  137. without alterating too much the quality of the set with regards to its
  138. discrepency and this heuristic.
  139. \begin{figure}
  140. \label{rand_iter2}
  141. \includegraphics[scale=0.3]{Results/random_iter.png}
  142. \caption{Dependence on iterations number: D=2}
  143. \end{figure}
  144. \begin{figure}
  145. \label{rand_iter3}
  146. \includegraphics[scale=0.3]{Results/random_iter_3.png}
  147. \caption{Dependence on iterations number: D=3}
  148. \end{figure}
  149. \subsection{Evolutionary heuristic: Simulated annealing and local search}
  150. \begin{figure}
  151. \begin{mdframed}
  152. \label{rand_flow}
  153. \includegraphics[scale=0.4]{flow_recuit.pdf}
  154. \caption{Flowchart of the simulated annealing local search heuristic}
  155. \end{mdframed}
  156. \end{figure}
  157. \subsubsection{Dependence on the temperature}
  158. \begin{figure}
  159. \label{rand_flow}
  160. \includegraphics[scale=0.3]{Results/resu_temp3.png}
  161. \caption{Dependence on iterations number: D=3}
  162. \end{figure}
  163. \begin{figure}
  164. \label{rand_flow}
  165. \includegraphics[scale=0.3]{Results/resu_temp3_zoom.png}
  166. \caption{Dependence on iterations number: D=3}
  167. \end{figure}
  168. \begin{figure}
  169. \label{rand_flow}
  170. \includegraphics[scale=0.3]{Results/resu_2_temp.png}
  171. \caption{Dependence on iterations number: D=3}
  172. \end{figure}
  173. \subsubsection{Stability with regards to the number of iterations}
  174. \begin{figure}
  175. \label{rand_flow}
  176. \includegraphics[scale=0.3]{Results/sa_iter.png}
  177. \caption{Dependence on iterations number: D=3}
  178. \end{figure}
  179. \subsection{Genetic (5+5) search}
  180. \begin{figure}
  181. \begin{mdframed}
  182. \label{rand_flow}
  183. \includegraphics[scale=0.4]{flow_recuit.pdf}
  184. \caption{Flowchart of the simulated annealing local search heuristic}
  185. \end{mdframed}
  186. \end{figure}
  187. \begin{figure}
  188. \label{rand_flow}
  189. \includegraphics[scale=0.3]{Results/res_gen_2.png}
  190. \caption{Dependence on iterations number: D=3}
  191. \end{figure}
  192. \begin{figure}
  193. \label{rand_flow}
  194. \includegraphics[scale=0.3]{Results/res_gen_2_zoom.png}
  195. \caption{Dependence on iterations number: D=3}
  196. \end{figure}
  197. \begin{figure}
  198. \label{rand_flow}
  199. \includegraphics[scale=0.3]{Results/res_gen_3_zoom.png}
  200. \caption{Dependence on iterations number: D=3}
  201. \end{figure}
  202. \begin{figure}
  203. \label{rand_flow}
  204. \includegraphics[scale=0.3]{Results/res_gen_4_zoom.png}
  205. \caption{Dependence on iterations number: D=3}
  206. \end{figure}
  207. \section{Results}
  208. \section{Conclusion}
  209. \end{document}