1. Introduction
Recently, there is a new Nim game named Jewish chess. People are still unclear about its origin. Perhaps it is just a game created by Chinese merchants as this game can be only found on Chinese website. However, its special rules and complexity interest a lot of people to work on it, but the perfect winning strategy has not been found yet. Nim game is a classic model in the theory of game and people were always trying to find the winning strategy of different games and design machine to play with human. The basic rule of Nim game is that two players make an action in turn and who make the last action will lose or win (depends on the rule). And the Jewish chess has special rules. It is based on different patterns. Each time a player is able to press 1-6 buttons in the same line or in the same row. Whoever presses the last button will lose the game.
This is actually not a new research field. The machine designed to play Nim games has a long history, which can be dated back to 1940. People did research on that not simply for fun but also thought this could push the development of math and artificial intelligence. The first machine was named The Nimatron [1]. Recently, researchers have already found some theory about Nim game, which is based on a calculation rule named xor[2]. By this calculation it is convenient to determine whether go first is going to win the game or go next. It shows that Jewish chess is a game that player who goes next will win in common patterns. Nim game winning strategy has also been discussed a lot [3]. Previous researches have already worked on Nim game play on graphs(just like Jewish chess) and a good strategy has been found. The strategy can be used in many Nim games based on graphs is mirroring strategy [4], which inspired me a lot to deal with Jewish chess. However, the strategy of mirroring can be only used in central symmetrical patterns. Circle or rectangle can be good examples. But other patterns also appear in Jewish chess so the mirroring method need to be improved. Also, the symmetric repeating cannot cope with more complex rule [5]. With research on Nim game going on, many new forms of the game is being researched. For example, the number of players is not restricted to 2 players anymore. Some methodologies can also be used when there are many random players [6].
In this regard, this study found a strategy that is an improved version of the classic mirroring strategy which can be used when the opponents find the right solution to deal with simple mirroring. This system opponent works most of the time. Also, some disadvantages of it are also found.
The rest of the paper is organized as follows: Section 2 will discuss the methodology that this paper research on this problem and also the winning strategy found. The problems that are still needed to deal with and the more specific demonstration of the strategy will be shown in the Section3. Section 4 will provide the conclusion of the entire research.
2. Methodology
The most common patter of the game is a 6x6 rectangle. Just as the picture shows.
The rule is that each time a player is able to put 1-3 buttons in a certain line or row. Whoever put the last button will be the loser. This research is aimed at finding a good winning strategy to have bi8gger chance to gain success.
The main idea of this winning strategy is repeating to mirror what theopponent does until there is only on row or one line left. At this point, as playerkept mirroring before, the buttons that are left for the player and the opponent must be central symmetric. Here are two possibilities that the player will lose the game. These two cases will be shown in the following Figures 1.
(a) | (b) | (c) |
Figure 1. The first possibility of the situation. |
Figure 1 (a) shows the first possibility. This situation appears when the opponent puts three buttons and left three buttons for the player. If the players keep mirroring and puts three buttons, obviously, the player is the one who put the last button, meaning that the player loses the game. Figure 1 (b) shows another possibility. If the opponent puts two of the tree buttons and the player chooses to mirror, there will be on button left for both the player and the opponent. After the opponent puts one of them, there will be only one left for the player. The result will be the same.
Thus, simply mirroring does not work at this point. Here is a strategy to deal with its flaw: If the opponent put all of the tree buttons as the picture one shows, the player ought to put two of the three that are left, leaving the last button to the opponent. If the opponent puts three buttons, the player ought to put tree buttons, also leaving the last button for the opponent. Thus, the mirroring strategy is improved.
CASE 1. Nevertheless, if the opponent is smart enough, there is way to cope with the basic mirroring strategy that are shown above. The opponent can try to make the pattern look like the Figure 2:
Figure 2. The pattern of the situation-1. |
As the Figure 2 shows, there is one button in each line left for both the player and the opponent. At this point, there is only one button left for both the player and the opponent in completely different rows and lines. Therefore, both the player and the opponent can only put one button each time. Obviously, the player is likely to lose the game. To deal with this problem, the origin of such situation should be figured out.
Let's track back a little bit. That problem came when the opponent did this as shown in Figure 3:
Figure 3. The pattern of the situation-2. |
When the opponent did something to make that there is only one left in a line, he or she actually caused potential danger. The result might be the situation showed above. Thus, the player ought to eliminate the danger. Take the picture as an example: when the opponent put the five buttons in a line, the player ought to put all of the six in order to avoid leaving only one in a line. After this, the player needs to observe for a while. There are two cases which need to be considered.
CASE 2. Firstly, if the opponent put the 1 left button, the pattern will look like this:
Figure 4. The pattern of the situation-3. |
As the Figure 4 shows, the pattern will become a central symmetric patter again, just like the initial condition. However, in this case, the player become the first person to move. Therefore, the opponent can use the basic mirroring strategy again. If the opponent does so, then the player will lose. Thus, now, the player needs to learn from the opponent. People can try to let only one button left in one line, which is similar to the case above. After doing this, there will be only one line left for both the opponent and the player and the player will be the next player to move. By using basic mirroring strategy, the player is able to win.
CASE 3. Secondly, the opponent also might put another button from another line. If so, except the left one, the pattern will look like is central symmetric and the player can use mirroring strategy again. The result is that after mirroring till the end, there will be only one button left for the opponent. The player can also be the winner.
Using the methodology mentioned above, most of the possibilities can be solved.
3. Result and Discussion
The result shows that the strategy in this study is very effective. Experiments have been done on different people. Playing with 200 players online, when using the strategy in this study, the winning cases can be up to 190, which means the winning percentage is about 95%. Apparently, this is a quite high winning percentage and shows that the strategy is useful to deal with most of the cases. But after simulating for several times, this study still found some situations that the strategy does not work by analysis the ten lost games
Firstly, in case two, the strategy is copying the opponent to left on button in one line and then there will be only one line. However, if the opponent does nothing special to the first line, but lefts only one button on the second line, the strategy will not work anymore. This is because after doing such things to the second line, there will be only online left for the player and therefore the opponent can use the study's strategy. It can be concluded that whether the strategy works depends on when does case two appears. (i.e.the strategy works only when the case two appears on the first line). Also, when the rectangle becomes n x n( n is not six), the situation can be more difficult. The possibility of such case is pretty high. In the ten games that the player lost, seven games were lost because of this reason. Therefore, coping with this problem can improve our winning percentage up to 94%.
Secondly, in case three, it can be assumed that the opponent left the one button until the game ends. However, it is possible that the opponent pit some buttons from other lines and turn to the one that is left again. At this point, the pattern cannot be considered as a central symmetric pattern anymore. What should the player do when it is not symmetric anymore is still waiting to be answered. In the experiment, three games were lost due to of this reason, which shows that the case does not occur that frequently.
Also, as the experiment has only been done for limited times, the study cannot make sure that there are no other possibilities that the mirroring strategy does not work. And the experiment has not been done on other patterns of Jewish Chess. Other research and experiment still need to be done. In the future, machine learning-based methods will be considered due to their excellent performance [7-10].
4. Conclusion
In conclusion, as a new Nim game, the winning strategy of Jewish Chess is still waiting people to discover. This study gives a possible solution by improving the mirroring strategy that people have already used for decades to deal with Nim game, which is based on the graph instead of calculations. The result shows that the strategy in this study is effective in most of the cases. However, there are still some cases that cannot be solved by using this strategy. Also, this study only focuses on the 6x6 rectangle. There are actually more interesting patterns that can be researched. Other methods except the mirroring strategy may be feasible, too. Another problem is achieving the strategy by artificial intelligence. The research of Jewish chess and Nim game will push the progress of theoretical math and benefit related field.
References
[1]. Lisa R. 2016. Machines designed to play Nim games. Teaching supports for mathematics, algorithmics and computer science (1940 – 1970). History and Pedagogy of Mathematics, Montpellier, France.
[2]. Matthieu D. 2012. Circular Nim Games. arXiv preprint arXiv:1211.0091.
[3]. Vaninsky. A. 2007. Activity-based introduction to the binary system: Nim game winning strategy. International Journal of Mathematical Education in Science and Technology 38.1 43-54.
[4]. Masahiko F 2003 A Nim game played on graphs. Theoretical Computer Science 304.1-3 387-399.
[5]. Shiran R 2020. Discounting-sensitivity in symmetric repeated games: An example. Operations Research Letters 48.1 1-3.
[6]. Wen A L 2018. One-Pile Nim games with arbitrarily many random players. Discrete Applied Mathematics 255 56-74.
[7]. Qiu Y 2020. Clustering Analysis for Silent Telecom Customers Based on K-means++. In 2020 IEEE 4th Information Technology, Networking, Electronic and Automation Control Conference (ITNEC) (Vol. 1, pp. 1023-1027). IEEE.
[8]. Valen J 2022. Quantifying uncertainty in machine learning classifiers for medical imaging. International Journal of Computer Assisted Radiology and Surgery, 17(4), 711-718.
[9]. Bacchi S 2022. Machine learning in the prediction of medical inpatient length of stay. Internal medicine journal, 52(2), 176-185.
[10]. Ahmed U 2022. Prediction of diabetes empowered with fused machine learning. IEEE Access, 10, 8529-8538.
Cite this article
Hu,X. (2023). The winning strategy for the Nim game-Jewish chess. Applied and Computational Engineering,4,393-397.
Data availability
The datasets used and/or analyzed during the current study will be available from the authors upon reasonable request.
Disclaimer/Publisher's Note
The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of EWA Publishing and/or the editor(s). EWA Publishing and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
About volume
Volume title: Proceedings of the 3rd International Conference on Signal Processing and Machine Learning
© 2024 by the author(s). Licensee EWA Publishing, Oxford, UK. This article is an open access article distributed under the terms and
conditions of the Creative Commons Attribution (CC BY) license. Authors who
publish this series agree to the following terms:
1. Authors retain copyright and grant the series right of first publication with the work simultaneously licensed under a Creative Commons
Attribution License that allows others to share the work with an acknowledgment of the work's authorship and initial publication in this
series.
2. Authors are able to enter into separate, additional contractual arrangements for the non-exclusive distribution of the series's published
version of the work (e.g., post it to an institutional repository or publish it in a book), with an acknowledgment of its initial
publication in this series.
3. Authors are permitted and encouraged to post their work online (e.g., in institutional repositories or on their website) prior to and
during the submission process, as it can lead to productive exchanges, as well as earlier and greater citation of published work (See
Open access policy for details).
References
[1]. Lisa R. 2016. Machines designed to play Nim games. Teaching supports for mathematics, algorithmics and computer science (1940 – 1970). History and Pedagogy of Mathematics, Montpellier, France.
[2]. Matthieu D. 2012. Circular Nim Games. arXiv preprint arXiv:1211.0091.
[3]. Vaninsky. A. 2007. Activity-based introduction to the binary system: Nim game winning strategy. International Journal of Mathematical Education in Science and Technology 38.1 43-54.
[4]. Masahiko F 2003 A Nim game played on graphs. Theoretical Computer Science 304.1-3 387-399.
[5]. Shiran R 2020. Discounting-sensitivity in symmetric repeated games: An example. Operations Research Letters 48.1 1-3.
[6]. Wen A L 2018. One-Pile Nim games with arbitrarily many random players. Discrete Applied Mathematics 255 56-74.
[7]. Qiu Y 2020. Clustering Analysis for Silent Telecom Customers Based on K-means++. In 2020 IEEE 4th Information Technology, Networking, Electronic and Automation Control Conference (ITNEC) (Vol. 1, pp. 1023-1027). IEEE.
[8]. Valen J 2022. Quantifying uncertainty in machine learning classifiers for medical imaging. International Journal of Computer Assisted Radiology and Surgery, 17(4), 711-718.
[9]. Bacchi S 2022. Machine learning in the prediction of medical inpatient length of stay. Internal medicine journal, 52(2), 176-185.
[10]. Ahmed U 2022. Prediction of diabetes empowered with fused machine learning. IEEE Access, 10, 8529-8538.