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:
- 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)
- 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.
- The team sends each player's command to the server.
- 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