Analysis of the Basic Principles of the blog park simulation football competition platform

Source: Internet
Author: User

Through the basic use of the platform. wmv, I believe that you have already understood the running effect of the entire platform. Below I will briefly analyze the basic operating principles of the platform, paving the way for everyone to write their own teams.

Subscribe to this seriesArticle


Simply put, the entire applicationProgramIs a C/S architecture. During the internship, one server (blog park simulation football competition platform) and two clients (teams compiled by everyone) were included ). The blog park simulation football competition platform communicates with teams written by everyone through TCP/IP. This is why you can use any language you are good at to compile the core principles of the team.

When starting the blog park simulation football competition platform, he will use the local IP address as his own IP address, and then bind the two listening ports to the Local Machine for listening to the connection requests of the team to be uploaded. Then we start the team. At this time, the team will connect to our blog park simulation football competition platform according to the IP address set in the configuration file. When the two teams are connected, the competition will be ready.

When the competition starts to run, the platform will discretization the entire competition, just like watching cartoons, which are composed of one frame and one frame. However, we call this frame a simulation cycle, that is, a cycle.

The execution process of the simulation cycle is as follows:

You can see that a simulation cycle can be divided into the following steps:

  1. The two teams receive information on the pitch from the platform respectively (for example, where the five players of our team are and where the five players of the other team are, football position and speed)
  2. The team makes analysis and judgment based on the information on the field (this is what we need to writeCodeTo specify a command for all players in the team.
  3. The team sends each player's command to the server.
  4. After the server receives a player's command, it updates the information on the field (for example, if the first player executes the running command, his position will change ).

 

From the above analysis, we can see that our team's job is to process the information on the pitch and calculate appropriate commands for each team member.

The general process can also be expressed as follows:

 

The decisions we make in each cycle (commands for all teams) will gradually influence the final results of the competition. Therefore, computing the decisions of each cycle will win us the final competition.

 

In the next article, I will share with you how to use the C # team Team template to compile my own football team.

 

Blog park simulation football exchange team

Download related resources

Related Articles

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.