SATRANÇ OYUNU İÇİN BİLGİSAYARLA GÖRME TABANLI HAMLE ALGILAMA VE YORUMLAMA SİSTEMİ
Bu çalışmada, satranç oyununda yapılan hamlelerin gerçek zamanlı olarak tespit edilmesi ve yorumlanmasına olanak veren bilgisayarla görme tabanlı bir izleme sistem geliştirilmiştir. Bu sistem ile satranç müsabakalarındaki hakemlerin karar verme süreçlerinin desteklenmesi planlanmaktadır. Sistemin mekanik bölümü için satranç tahtasını tepeden gören bir izleme düzeneği geliştirilmiş olup bu düzenekte bir RGB web kamerası ve bir dizüstü bilgisayar yer almaktadır. Sistemin yazılım bölümü ise herhangi bir üçüncü parti satranç motoru kullanılmadan sadece Matlab programlama ortamında geliştirilmiştir. Önerilen sistem, hamle algılama ve hamle yorumlama işlevlerini ayrı ayrı yerine getirmektedir. Hamle algılama bölümünde kamera aracılığıyla elde edilen anlık görüntüler sırasıyla işlenerek hamle tespiti yapılmış, satranç taşlarının konum ve renk bilgisi belirlenmiştir. Bu aşamada ayrıca, satranç tahtasının geometrik olarak düzeltilmesi ve görüntü kırpma gibi ön işlemler de yer almaktadır. Hamle yorumlama bölümünde ise, hamle sırasının ve geçerliliğinin belirlenmesi, geçersiz bir hamle yapılması halinde ilgili uyarı mesajlarının verilmesi sağlanmıştır. Ayrıca, oyundan elde edilen verilerin iki boyutlu olarak görselleştirilmesi ve hamle kayıtlarının saklanması da sağlanmıştır. Geliştirilen sistem, her biri 100’er özdeş hamleden oluşan ancak farklı ışık koşullarında oynanan üç oyun senaryosu ile test edilmiştir. Elde edilen hamle algılama ve yorumlama başarıları her bir oyun için sırasıyla %96, %98 ve %95 olarak hesaplanmıştır. Sistemin yüksek doğrulukla çalışması için bazı kısıtlar mevcut olup bunlar; satranç taşlarının renklerinin birbirlerine çok yakın olmaması, oyun esnasında ortam ışığının sabit kalması ve kamera açısının ve konumunun sabit tutulması, olarak sıralanabilir.
A Computer Vision Based Move Detection and Interpretation System for Chess Game
In this study, a real time computer vision based tracking system that enables to detect and interpret moves in a chess game is developed. With this system, it has planned to support the decision making processes of referees in chess matches. For the mechanical part of the system, a setup is established, which is positioned over the chess board and includes a RGB web camera and a laptop computer. For the software part, all the implementations are carried out with Matlab programming environment without using any third party chess engine. The proposed system performs move detection and interpretation processes individually. In move detection part, snapshots taken by the camera are processed one by one. For each snapshot, color and position of each chess piece are identified. This stage also enables the preprocessing steps such as geometric rectification of chess board and image cropping. In move interpretation part, move turns and the validation of the moves are identified. Illegal moves are notified by the system. Besides, the results are visualized in a 2D environment and logged. The system was tested with three game scenarios where each game is composed of 100 identical moves but played under different illumination conditions. The accuracies of move detection and interpretation are computed to be 96%, 98% and 95% for each scenario, respectively. There are some limitations for the system to work with high accuracy; the colors of the chess pieces are not very close to each other, the ambient light remains constant during the game and the camera angle and position are kept constant.
___
- 1. Angelkov, D., Koceska, N. ve Koceski, S. (2015) Automated chess playing with a robot manipulator, International Journal of Engineering Issues, 2, 45-51.
- 2. Ataş, M., Doğan, Y. ve Ataş, İ. (2014) Satranç oynayan robot kolu, IEEE 22nd Signal Processing and Communications Applications Conference, Trabzon, doi:10.1109/SIU.2014.6830443.
- 3. Banerjee, N., Saha, D., Singh, A. ve Sanyal, G. (2011) A simple autonomous robotic manipulator for playing chess against any opponent in real time, Proceedings of the International Conference on Computational Vision and Robotics, Bhubaneswar.
- 4. Bennet, S. ve Lasenby, J. (2014) Chess – Quick and robust detection of chess-board features, Computer Vision and Image Understanding, 118, 197-210, doi:10.1016/j.cviu.2013.10.008.
- 5. Cour, T., Lauranson, R. ve Vachette, M. (2002) Autonomous chessplaying robot, Ecole Polytechnique, (July 2002).
- 6. Douskos, V., Kalisperakis, I. ve Karras, G. (2007) Automatic calibration of digital cameras using planar chess-board patterns, Proceedings of the 8th Conference on Optical 3-D Measurement Techniques, ETH Zurich, I, 132-140.
- 7. FIDE Handbook, (2017). Standards of Chess Equipment and FIDE Tournaments. Erişim Adresi: https://www.fide.com/fide/handbook.html (Erişim Tarihi: 28.04.2017).
- 8. Han, K.M. ve Desouza, G.N. (2007) A feature detection algorithm for autonomous camera calibration, Proceedings of the 2007 IFAC International Conference on Informatics in Control, Automation and Robotics, Angers, 286-291.
- 9. Illeperuma, G.D. (2011) Using image processing techniques to automate chess game recording, Proceedings of the Technical Sessions, 27, 76-83.
- 10. Kaur, G., Yadav, A. ve Anand, V. (2010) Design and implementation of artificially intelligent microcontroller based chess opponent, Proceedings of the World Congress on Engineering, London.
- 11. Khater, I.M, Ghorab, A.S. ve Aljarrah, I.A. (2012) Chessboard recognition system using signature, principal component analysis and color information, Second International Conference on Digital Information Processing and Communications, Klaipeda City, 141-145, doi:10.1109/ICDIPC.2012.6257285.
- 12. MathWorks Support, (2017). detectCheckerboardPoints. Erişim Adresi: https://www.mathworks.com/help/vision/ref/detectcheckerboardpoints.html (Erişim Tarihi: 03.05.2017).
- 13. Matuszek, C., Mayton, B., Aimi, R., Deisenroth, P.D., Bo, L., Chu, R., Kung, M., Legrand, L., Smith, J.R. ve Fox, D. (2011) Gambit: A robust chess-playing robotic system. IEEE International Conference on Robotics and Automation, Shanghai, 4291–4297, doi:10.1109/ICRA.2011.5980528.
- 14. Neufeld, J. ve Hall T.S. (2010) Probabilistic location of a populated chessboard using computer vision, circuits and systems, 53rd IEEE International Midwest Symposium on Circuits and Systems, Seattle, 616-619, doi:10.1109/MWSCAS.2010.5548901.
- 15. Piškorec, M., Antulov-Fantulin, N., Ćurić, J., Dragoljević, O., Ivanac, V. ve Karlović, L. (2011) Computer vision system for the chess game reconstruction, Proceedings of the 34th International Convention MIPRO, Opatija, 23-27.
- 16. Sajo, L., Ruttkay, Z. ve Fazekasa, A. (2011) Turk-2, A multi-modal chess player, International Journal of Human-Computer Studies, 69(7-8), 483-495.
- 17. Satranç Dünyası, (2017). FIDE Satranç Kuralları. Erişim Adresi: http://www.satranc.net/satranc-kurallari (Erişim Tarihi: 04.04.2017).
- 18. Sokic, E. ve Ahic-Djokic, M. (2008) Simple computer vision system for chess playing robot manipulator as a project-based learning example, IEEE International Symposium on Signal Processing and Information Technology, Sarajevo, 75-79, doi:10.1109/ISSPIT.2008.4775676.
- 19. Zhao, S., Chen, C., Liu, C. ve Liu M. (2008) Algorithm of location of chessrobot system based on computer vision, Chinese Control and Decision Conference, Yantai, Shandong, doi:10.1109/CCDC.2008.4598325.