Warning: Use of undefined constant fb_replace_wp_version - assumed 'fb_replace_wp_version' (this will throw an Error in a future version of PHP) in /usr/home/heximal/data/www/heximal.ru/public/blog/wp-content/plugins/replace-wp-version/fb-re_wpversion.php on line 39
Chess | heximal blog

Warning: Cannot modify header information - headers already sent in /usr/home/heximal/data/www/heximal.ru/library/Heximal/Lang.php on line 43

Archive

Posts Tagged ‘chess’

Chess piece shortest path algorithm

January 11th, 2018 4 comments

Recently I had to solve the problem of finding the shortest path from A to B and implement it programmatically. “There exists tons of solutions for sure”, – that what I thought… I was wrong. Few days of searching didn’t give any relevant result. The maximum I have found is some mentions that this problem can be solved by using graphs theory and so called BFS algorithm (breadth first search). In this article I’ll try to analyze this method of finding chess pieces shortest path in details with code examples and explanations.
Read more…

Categories: Coding Tags: , , , ,