Man-Machine game, sub-game (I)

Source: Internet
Author: User
(1) What is Ziqi?

Playing Ziqi is an entry-level chess for children to learn go. Its rules are partly taken from go, but it is much simpler than go.

(2) What are the rules for playing chess?

1. When playing a chess game, if a piece of chess is not played, it must be placed in a position that can hold the other piece tight.

2. When a piece of chess is in the beaten state, you can escape, instead of pressing the other piece.

3. Play chess. When a chess piece is promoted, the score is equal to or equal to the score.

4. There are two ways to win a game, that is, to eat and to eat in doubles.

5. For Ziqi, the start must be at tianyuan.

(3) Application Design Ideas

The general idea of designing this application is as follows:

Data:

1. chessboard Representation

2. Representation of pawns

3. Calculate auxiliary data of chess pieces

AI:

1: generate the rule of playing chess (generate the rule of playing chess)

2: The core of valuation (the current idea is to analyze and count the two sides and take special measures to eat and levy Doubles)

3: excellent search engine (currently only narrow window search is used, an optimized alpha-Beta Search)

Ui:

Cocos2d-x 3.2

Draw a chessboard, chess piece, start interface, background, and so on.
(4) AI

Given the rules of playing chess, it is much easier to do AI. Aside from the question, currently, the AI of Go is mostly dual-random-Monte Carlo algorithms. If you are interested, you can study them.

1. Route generation:

It is easier to generate a method, because in most cases, each step requires the opponent's anger, while in a few cases, it can only survive. Therefore, there are few reasonable ways to do this in the middle of the year, games are rarely developed to a later stage.

2. Valuation core:

It is also relatively easy to judge the game surface, and abstract concepts such as region and potential do not need to be considered. These abstract concepts have not even found a good solution for current computer scientists. However, this part is very difficult to test, and many parameters need to be fine-tuned to detect changes in chess and board power. Determine the situation and win-or-lose for the leaf nodes that have not been mentioned. 1. It's my turn to win if the other party has a fight. 2. It's my turn to play, and the other party does not have a one-stop player, and I have two one-stop players, then I fail. 3. It's my turn to fight against the enemy. If I am not so angry, the other party can play two games. If I start to think about it, it is possible to eat and seek food in doubles. 4. In the same case, consider yourself. If we have only one chance to compete, consider whether we will be asked to eat it or not. 5. None of them appear. consider some additional parameters.

3. Search Engine: PVS. If you have performance requirements, consider using a replacement table.


Conclusion:

I once worked as a TA in a part-time go entry class and knew that it was a big task to accompany 4-5-year-old children to go, because they often get angry and naughty when playing chess. When children get started, they have to play chess. When they go home after class, they are accompanied by their parents. In addition, whether they win or lose, it is a big thing. However, all the parents say that they will not be angry and naughty when fighting against their computers.

As a result, I searched the internet to find out if I had any sub-game software, which left my parents away from the bitter sea. It also allowed my children to concentrate on playing chess instead of crying and playing naughty games, but I did not find it. It may be because of a small demand, generally, children can play GO games in the next week.

I am developing this game in my spare time. You are welcome to have a lot of discussions with Go fans and those who are interested in playing games.


Indicate the source for reprinting. Thank you.

Man-Machine game, sub-game (I)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.