Test Match Simulator by Daniel Thomas This program is released as FREEWARE and may be freely distributed as long as no fee other than a copying fee is charged. Please pass it on to your friends, post it on Bulletin Boards, send it in to Shareware Libraries etc. Just make sure the following files are included: READ.ME Short Introduction CRICKET.DOC What you are reading now CRICKET.EXE The main program *.DAT Data files for each of the Test playing countries (There should be seven of these) Any comments, suggestions, bugs, donations (if you want to) can be sent to:- Upto 30th September 1992 After 30th September 1992 Daniel Thomas Daniel Thomas MSc Student 17 Chapel Close Computer Science Department Monmouth Keele University Gwent Keele NP5 3NN Staffs Great Britain ST5 5BG Great Britain Email : csp57@seq1.keele.ac.uk or daniel@cs.keele.ac.uk I also regularly read rec.sports.cricket on the newsnet. One thing I am after as I can't always get the details are career averages, batting styles, bowling styles of foreign (to me) players. It is my aim for this program to be as accurate as possible and as I base my initial ratings for players on averages, career ones give a better picture. I am also interested in all local country teams, players and competitions. My ultimate aim is to have a program (or more probable suite of programs) that will simulate cricket in any nation with all teams and competitons accurate plus have International cricket. If you can help me it will hopefully improve the quality of the program I envisage creating. (This one is just the start and is really only for fun.) All contributors will be credited in future releases. GENERAL ------- This program simulates Test matches between the seven cricketing nations of the world. In no particular order: - England - Australia - West Indies - Pakistan - India - New Zealand - Sri Lanka The simulation is run as a series of cricketing tours expected to be made in the next few years. Not all of these tours have been confirmed and some additional ones have been made up to make more teams play each other. To start the program type in CRICKET (After doing any necessary de-archiving and changing to the correct drive and directory.) and press return. Note:- Whenever a page of text is displayed, pressing any key will advance it to the next page. A series is shown as follows: Firstly the tour details are shown, who is playing, when, how many Tests and where they will be played. Then for each Test: The teams are displayed. The team is chosen by the computer. It takes into account players various skills, the expected pitch conditions and the current form of a player. The Test is then played by the computer. Although this appears to be almost instantaneous there are thousands of calculations done before the result is found. The computer always tries to create a result (time and weather permitting). Even the Man of the Match is calculated. Complete scorecards for each innings are shown. Player ratings are shown. At the end of a series: A summary of the series is shown showing all the results of the Tests, who won the series and the Man of the Series. Complete series batting and bowling averages are shown. This is repeated for all the tours. There are quite a few covering four years of Test cricket. After all the tours have been completed: Career averages for all the nations are shown Complete records are shown including: - Highest Team Score - Lowest Team Score - Highest Individual Innings - Highest Wicket Partnerships - Most runs in a series - Most runs in a career - Best bowling in an Innings - Best bowling in a Match - Most wickets in a series - Most wickets in a career - Most catches in a series - Most catches in a career Overall team performances against all the other teams. The program is then ended. To re-run it type CRICKET again and press return. The results for each run of the program are different. SIMULATION DETAILS ------------------ This section is only for those people who are interested in how the Test is calculated. It is not necessay to read this to use the program. Countries: Each country has a number of Test playing grounds. Although the exact state of a pitch is not always definite most grounds generally produce pitches that have certain characteristics. Each ground is given a rating for how much it will assist or hinder the following types of bowlers: - Spin/Slow - Seam/Swing - Pace Teams: Each team has a squad of 20 players. These are made up as follows: - 4 Openers - 5 Batsmen - 2 Wicket-keepers - 3 All-rounders - 3 Spin bowlers - 3 Other bowlers In this simulation an all-rounder is generally considered not to be a spin bowler. Each player is rated for the following attributes: - Batting Skill [1..11+] Generally batting average divided by 5 - Batting Speed [1..4] How fast a player scores. The faster he scores the more risks he is taking of being caught. 1 is slow and steady e.g. Boycott and 4 is fast e.g. Botham - Bowling Skill [1..5+] Loosely based on their bowling average. < 20 5 < 24 4 < 28 3 < 32 2 > 32 1 - Type of Bowler [Fast,Medium,Spin] - Fielding skill [1..5] Maybe should be catching skill as it is derived from the frequency they get catches. - Form The current form of a player is derived from the players ratings in the recent Test matches. If a player did not play in the last Test match he is given a random form rating for that match. The last three matches are taken into consideration for current form with the most recent carrying most weight. When a team is picked for a test it is made up of: - 2 Openers - 3 Batsmen - 1 Wicket-keeper - 2 All-rounders - 1 Spin bowler - 2 Other bowlers This changes if the pitch is expected to take a lot of spin when: - 2 Spin bowlers - 1 Other bowler are picked instead. A player is picked by calculating a rating by applying different weights to the above attributes dependant on the type of player they are. e.g. A opener has a high batting weighting and a very low bowling rating. When the team is displayed the bowlers that will be used are also displayed. Tests: When a test is played a lot of factors are considered for each decision. After the toss, the computer elects who bats and who bowls by considering the weather and the pitch. The main part of the simulation is considered an encounter between a batsmen and a bowler. The batsmen is rated using: - Batting Skill - Batting Speed (The one fixed in the team data) - Condition of Pitch - Weather - Fatigue (How long he has been at the crease) - Risks (This changes over the course of an innings. At the start a player takes few risks and then as his innings builds takes more risks. The risks taken are relative to his Batting Speed.) - Situation of match - Team aggression (How much risks are taken by the team due to match situation. Again this is relative.) As can be seen there are three ratings for how fast a batsman attempts to score runs. These can sometimes cancel each other out or combine to means one batsmen scores really quickly. The program though calculates these so fast it is not actually visually visible. The bowler is rated using: - Bowling Skill - Assistance/Hinderance pitch is to his style - Weather - Fatigue - Agression (Listed here but is a more general fielding attribute. It basically means that more effort is made to remove a new batsmen but a more more defensive posture is made to set in batsmen. The higher the agression the more likely runs are to be conceeded as well as wickets taken.) The two ratings are calculated, a random element added and then compared. The result of the encounter is as follows: - Runs are scored - No runs scored - Extras conceeded - An appeal (This can be turned down although it is not shown on the screen.) - A wicket falls After each over the current match situation is assessed and the computer may decide that the following should be done. - Batting team is doing well and should increase run-rate - Batting team is doing badly and should decrease run-rate and play safely - Batting team should declare - Bowling team is on top and should enforce extra pressure - Bowling team is suffering and should adopt a more defensive posture to slow down the run-rate. Each test is played over 5 days and for each day the weather is determined. The weather can change from over to over. There can be interruptions for rain and bad light but these are not shown. The Man of the Match and players ratings for a test is worked out using the following formula: Batting 1 point for every run scored Bowling 2 points for every maiden over 20 points for every wicket taken Fielding 5 points for every catch 10 points for a run out 10 points for a stumping This method does tend to be biased towards all rounders/bowlers and sometimes throws up an unexpected Man of the Match. e.g. If a bowler takes 2 wickets in each innings and has two innings of 20 runs he gets a higer rating than a batsmen who scores 115 and 0 in his two innings. Thus consistency can lead to getting a good rating. HISTORY ------- I have always been fascinated by cricket (never any good at playing it!) and when younger devised my own game based on the a normal dice. When I first got my hands on a computer in 1980 I started simulating cricket on it. The program went through several evolutions as I kept on changing computers and programming languages. My best one was probably on an Amstrad CPC6128 which had all the statistical details off this one but provided a full ball by ball commentary and full player participation. Unfortunately this went with the computer and even though I have all the source code in BASIC I haven't had the time to convert it properly as at this time I went to University. INTENDED IMPROVEMENTS --------------------- This program is the start in trying to recreate and improve upon that version. Additions I want to make are: * Add player participation: This is very important but I'm not yet fully decided upon at what detail as I went this to remain an accurate simulation and not turn into an arcade type game. Probably provide:- - How aggresive each batsmen bats with regard to each bowler - How agressive a bowler bowls at each current batsmen - Field positions - Overall run rate to aim at - Declerations - Changing Bowlers - Order of batsmen Control will be allowed at the end of each over or when a wicket falls. I don't yet think I will provide control of individual fielders by moving a joystick etc. as this control could be difficult and take the edge off the simulation. * Graphics: I definitely want to try and improve the display but I don't want to restrict the computer the program will run on so it will probably start as a Text graphic representation and then maybe I will write a EGA/VGA version as well. * Save Tests and Records: Save all the best performances as shown in this program so that comparisons be made. Maybe have something pop up if a record is broken in a current match. * Edit players: Have the ability to alter the database so that players can be added. This would be on two levels: - Simple, the users enters the players career/expected averages and the computer calculates all the relevant skills from them. - Detailed, when a user is most used to the program they will be able to enter each rating infividually. * Any good ideas from out there. I know that this program is not easy to see where I intend to go but bear with me.