⬆️ ⬇️

Own chess (with tanks and helicopters)

To chess, I am not indifferent since childhood. Although I never learned to play really well, the process of the game gives me great pleasure. I learned a long time ago that in addition to traditional chess known to all, there are other varieties of them. I do not remember on what computer, on the Spectrum or Vector 06 C, I first saw Xiangza . The game was completely in Chinese and it was necessary to comprehend its rules "at random". Later, I learned about the existence of Shogi , Chaturanga and other close relatives of Chess. The publications in Quantum spurred interest in Fairy-tale chess . I was interested in the question, how many varieties of chess are known at all? It turned out that they are incredibly many. So much so that the list devoted to this issue on Vika is very, very far from being considered complete.



Much later, when I became a professional programmer, I had the idea to develop a universal application to control the rules of the moves in various chess-like games on square and rectangular boards. Of course, I had no idea that I could create a universal AI. Even the task of implementing a universal chessboard, with a customizable control of various rules and the ability to play online, looked very heavy. I collected the rules of chess games, tried to summarize them, but, given the fact that I did this brief fray, between the main work, the process slipped and went very slowly. This continued until last Friday, I discovered a project called Zillions of Games .



Realizing what I stumbled upon, I thought that I was in a fairy tale. Even in the free demo-version it was proposed to play 48 completely different games implemented on the same engine. In addition to chess and checkers, there were varieties of tic-tac-toe, Go (using the plug-in dll as an engine), various puzzles. There were games that I had never heard of. Chess itself was represented by a gentleman's set of traditional, Chinese, Korean, Thai and Japanese chess. The latter, in the demo version, were presented only in a mini-version , which in itself was a good reason to purchase the full version of the game.



image

')

But the main thing was not the set of games presented, and not even the fact that, after purchasing the paid version, there was an opportunity to download more than 2000 additional games and puzzles , but that to develop a new game, it was enough to describe its rules in a language reminiscent of Lisp . A language guide, as well as thousands of examples of its use, have been attached. Then I realized that I had found something I had dreamed about for a long time and that this entertainment would be enough for me for a long time.



In general, I decided to explore the possibilities of the Zillions of Games rule description language (ZRF) more closely, and in the process of studying, write something interesting and useful on it. Of course, I plan to move from simple to complex, but in order not to lose perspective, I will try to describe the “Dream Game” I want to come to in the end.



So:



General information





Figures



Generator




Hourly




Soldier




the officer




Cavalryman




A gun




Helicopter




Tank




Scout




Modifiers



Stimulant




Ricochet




Around the World




Hedges



Trap




Wall




Mine




It is easy to see that some of these rules can be very difficult to implement. It is quite possible that I will not succeed in realizing my plans in full, but often, the process of movement itself is much more important than the possible result. I will try to illustrate my progress in mastering Zillions of Games with articles on Habré. In the meantime, I propose to discuss the presented rules.

Source: https://habr.com/ru/post/210468/



All Articles