Combining Simulated Annealing and Monte Carlo Tree Search for Expression Simplification

Ben Ruijl, Jos Vermaseren, Aske Plaat, Jaap van den Herik

2014

Abstract

In many applications of computer algebra large expressions must be simplified to make repeated numerical evaluations tractable. Previous works presented heuristically guided improvements, e.g., for Horner schemes. The remaining expression is then further reduced by common subexpression elimination. A recent approach successfully applied a relatively new algorithm, Monte Carlo Tree Search (MCTS) with UCT as the selection criterion, to find better variable orderings. Yet, this approach is fit for further improvements since it is sensitive to the so-called “exploration-exploitation” constant Cp and the number of tree updates N. In this paper we propose a new selection criterion called Simulated Annealing UCT (SA-UCT) that has a dynamic exploration-exploitation parameter, which decreases with the iteration number i and thus reduces the importance of exploration over time. First, we provide an intuitive explanation in terms of the exploration-exploitation behavior of the algorithm. Then, we test our algorithm on three large expressions of different origins. We observe that SA-UCT widens the interval of good initial values Cp where best results are achieved. The improvement is large (more than a tenfold) and facilitates the selection of an appropriate Cp.

References

  1. Aho, A. V., Sethi, R., and Ullman, J. D. (1988). Compilers: Principles, Techniques and Tools. Addison-Wesley.
  2. Breuer, M. A. (1969). Generation of Optimal Code for Expressions via Factorization. Commun. ACM, 12(6):333-340.
  3. Browne, C., Powley, E., Whitehouse, D., Lucas, S., Cowling, P., Rohlfshagen, P., Tavener, S., Perez, D., Samothrakis, S., and Colton, S. (2012). A Survey of Monte Carlo Tree Search Methods. Comp. Int. and AI in Games, IEEE Trans. on, 4(1):1-43.
  4. Ceberio, M. and Kreinovich, V. (2004). Greedy Algorithms for Optimizing Multivariate Horner Schemes. SIGSAM Bull., 38(1):8-15.
  5. Coulom, R. (2007). Efficient Selectivity and Backup Operators in Monte-Carlo Tree Search. In Proceedings of the 5th International Conference on Computers and Games, CG'06, pages 72-83, Berlin. Springer-Verlag.
  6. Hashimoto, J., Kishimoto, A., Yoshizoe, K., and Ikeda, K. (2012). Accelerated UCT and Its Application to TwoPlayer Games. Lecture Notes in C.S., 7168:1 - 12.
  7. Horner, W. (1819). A New Method of Solving Numerical Equations of All Orders by Continuous Approximation. W. Bulmer & Co. Dover reprint, 2 vols 1959.
  8. Kirkpatrick, S., Gelatt, C. D., and Vecchi, M. P. (1983). Optimization by simulated annealing. Science, 220:671- 680.
  9. Knuth, D. E. (1997). The Art of Computer Programming, Volume 2 (3rd Ed.): Seminumerical Algorithms. Addison-Wesley Longman Pub. Co., Inc., Boston.
  10. Kocsis, L. and Szepesvári, C. (2006a). Bandit based MonteCarlo Planning. In In: ECML-06. LNCS 4212, pages 282-293. Springer.
  11. Kocsis, L. and Szepesvári, C. (2006b). Discounted UCB. Video Lecture. In the lectures of PASCAL Second Challenges Workshop 2006.
  12. Kuipers, J., Plaat, A., Vermaseren, J., and van den Herik, J. (2013a). Improving multivariate Horner schemes with Monte Carlo Tree Search. Computer Physics Communications.
  13. Kuipers, J., Ueda, T., and Vermaseren, J. (2013b). Code Optimization in FORM. http://arxiv.org/abs/1310.7007.
  14. Lee, C.-S., Wang, M.-H., Chaslot, G., Hoock, J.-B., Rimmel, A., Teytaud, O., Tsai, S.-R., Hsu, S.-C., and Hong, T.-P. (2009). The Computational Intelligence of MoGo Revealed in Taiwan's Computer Go Tournaments. IEEE Trans. Comput. Intellig. and AI in Games, 1(1):73-89.
  15. Leiserson, C. E., Li, L., Maza, M. M., and Xie, Y. (2010). Efficient Evaluation of Large Polynomials. In In Proc. International Congress of Mathematical Software - ICMS 2010. Springer.
  16. Ruijl, B., Plaat, A., van den Herik, J., and Vermaseren, J. (2013). Combining Simulated Annealing and Monte Carlo Tree Search for Expression Simplification. http://arxiv.org/abs/1312.0841.
  17. van den Herik, J., Kuipers, J., Vermaseren, J., and Plaat, A. (2013a). Investigations with Monte Carlo Tree Search for finding better multivariate Horner schemes. Commun. in Computer and Information Science 2013. In press.
  18. van den Herik, J., Plaat, A., Kuipers, J., and Vermaseren, J. (2013b). Connecting Sciences. In ICAART 2013 - Proceedings of the 5th International Conference on Agents and Artificial Intelligence, pages IS-7 - IS-16.
Download


Paper Citation


in Harvard Style

Ruijl B., Vermaseren J., Plaat A. and van den Herik J. (2014). Combining Simulated Annealing and Monte Carlo Tree Search for Expression Simplification . In Proceedings of the 6th International Conference on Agents and Artificial Intelligence - Volume 1: ICAART, ISBN 978-989-758-015-4, pages 724-731. DOI: 10.5220/0004925707240731


in Bibtex Style

@conference{icaart14,
author={Ben Ruijl and Jos Vermaseren and Aske Plaat and Jaap van den Herik},
title={Combining Simulated Annealing and Monte Carlo Tree Search for Expression Simplification},
booktitle={Proceedings of the 6th International Conference on Agents and Artificial Intelligence - Volume 1: ICAART,},
year={2014},
pages={724-731},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0004925707240731},
isbn={978-989-758-015-4},
}


in EndNote Style

TY - CONF
JO - Proceedings of the 6th International Conference on Agents and Artificial Intelligence - Volume 1: ICAART,
TI - Combining Simulated Annealing and Monte Carlo Tree Search for Expression Simplification
SN - 978-989-758-015-4
AU - Ruijl B.
AU - Vermaseren J.
AU - Plaat A.
AU - van den Herik J.
PY - 2014
SP - 724
EP - 731
DO - 10.5220/0004925707240731