blake
School Cricketer
As of yet I have not started any of the programming - just the runscoring algorithm. I haven't enough knowledge yet to make the menus look good and get all the team selection, etc. working yet, but I think I can simulate a match - using a lot of hard work.
This is just a core project right now - only at the very beginning. Just doing this for fun really, and there is not a huge chance of this being finished.
My run algorithm seems to be working solidly now - it is still not brilliant.
I have completed 2 overs of testing. Here is how my ball is determined.
There are 48 different places a ball can be delivered, ranging from a full toss from wide outside off, or an extremely short bouncer outside leg.
Each place in the pitch is given a value, for the bowler and batsman. Each batsman's values is individual, so a batsman might be better at playing certain areas than other.
The bowler is assigned skill and consistency. Consistency determines where the ball will land - the higher the consistency, the better place the ball will land - the ideal spot is on a good length outside off for a test match.
Each place in the pitch where a ball can land is given a value for bowling also which is fixed for all bowlers. Once a location is determined, the value is multiplied by the bowler's skill to find the 'BowlBall' value, which is the final value of how good a delivery it is.
For the batsman, a random number is now chosen between 4-25 which is then divided by 10. (I could've just done 0.4 to 2.5 but I am not sure how decimals fully work yet in C++ with random number selection). Next, it is determined where the ball has landed from the bowler, and we find out how good the batsman is in that area. Now, the random number is multiplied by the batsman's skill in the area which finds the BatBall value.
Finally, BatBall is divided by BowlBall, and whatever the number determines the result. The lower the number, the more runs scored.
I have assigned a good length outside off a value of 9, and an extreme bouncer outside leg a value of 0.5, which is the worst you can get.
I haven't added any extras (wides, no balls, byes, etc.) yet. Just pure runs.
I have tested two bowlers (Glenn McGrath and Brett Lee).
Glenn McGrath:
Consistency: 95
Skill: 80
Brett Lee
Consistency: 80
Skill: 95
These are two top notch bowlers, and I have made a batsman called Blake. He is a good opening batsman with solid attributes. Here is how the 5 overs panned out.
0.1 Glenn McGrath to Blake: Outside Off, Blockhole, 0 runs
0.2 Glenn McGrath to Blake: Off Stump, Blockhole, 0 runs
0.3 Glenn McGrath to Blake: Straight, Blockhole, 0 runs
0.4 Glenn McGrath to Blake: Straight, Blockhole, 1 run
0.5 Glenn McGrath to Blake: Straight, Blockhole, 0 runs
0.6 Glenn McGrath to Blake: Off Stump, Good Length, 0 runs
Only one batsman, no running between wickets yet.
A very full over from McGrath. Considering it is test match cricket, I might have to make shorter deliveries far more common. Still, a blockhole is a handy delivery here and tough to score from.
Batsmen 0/1 (1.0 overs)
Blake: 1* (6)
McGrath: 1-0-1-0
1.1 Brett Lee to Blake: Off Stump, Blockhole, 0 runs
1.2 Brett Lee to Blake: Leg Stump, Blockhole, 2 runs
1.3 Brett Lee to Blake: Outside Off, Low Full Toss, 4 runs
1.4 Brett Lee to Blake: Leg Stump, Blockhole, 0 runs
1.5 Brett Lee to Blake: Straight, Good Length, 2 runs
1.6 Brett Lee to Blake: Outside Off, Blockhole, 2 runs
Expensive over from Brett Lee. Lee's consistency isn't as good, meaning the ball doesn't always find the best areas, but his skill is higher, giving him a better chance of taking a wicket. Still, the run rate is a little high for a test match.
Batsmen 0/11 (2.0 overs)
Blake: 11* (12)
Lee: 1-0-10-0
2.1 Glenn McGrath to Blake: Off Stump, Blockhole, 0 runs
2.2 Glenn McGrath to Blake: Wide Off, Good Length, 2 runs
2.3 Glenn McGrath to Blake: Wide Off, Good Length, 3 runs
2.4 Glenn McGrath to Blake: Straight, Blockhole, 1 run
2.5 Glenn McGrath to Blake: Wide Off, Good Length, 2 runs
2.6 Glenn McGrath to Blake: Straight, Blockhole, 0 runs
Turning out a bit more like One Day cricket now. Perhaps I should change it to that. Good start anyway for the batsman.
Batsmen 0/19 (3.0 overs)
Blake: 19* (18)
McGrath: 2-0-9-0
3.1 Brett Lee to Blake: Off Stump, Good Length, OUT
3.2 Brett Lee to Blake: Outside Off, Blockhole, 2 runs
3.3 Brett Lee to Blake: Off Stump, Blockhole, 2 runs
3.4 Brett Lee to Blake: Outside Off, Low Full Toss, 4 runs
3.5 Brett Lee to Blake: Leg Stump, Blockhole, 1 run
3.6 Brett Lee to Blake: Wide Off, Good Length, 2 runs
Batsmen 1/30 (4.0 overs)
Blake c Gilchrist b Lee 19 (19)
Blake 2: 11* (5)
Lee: 2-0-21-1
Brett Lee gets the breakthrough in an eventful over, it was pitched on a good length and the worst possible random number for the batsman is never a good sign.
4.1 Glenn McGrath to Blake: Off Stump, Good Length, 0 runs
4.2 Glenn McGrath to Blake: Straight, Blockhole, 0 runs
4.3 Glenn McGrath to Blake: Off Stump, Blockhole, 0 runs
4.4 Glenn McGrath to Blake: Off Stump, Blockhole, 0 runs
4.5 Glenn McGrath to Blake: Outside Off, Good Length, 0! runs
4.6 Glenn McGrath to Blake: Off Stump, Blockhole, 0 runs
Maiden over from McGrath, including a perfect ball on a good length outside off. Blake probed at it but it fell short of first slip.
Batsmen 1/30 (5.0 overs)
Run Rate: 6.00
Blake c Gilchrist b Lee 19 (19)
Blake 2: 11* (11)
McGrath: 3-1-9-0
So, there we have it, the first 5 overs using my algorithm. Now that I look at this I find out that I need to include far more short deliveries and way less blockholers as it is quite rare to see a delivery pitched in the blockhole in a test match, let alone 3 every over.
Solid start anyway by my sim. Tweaking needed but it is looking decent anyway.
This is just a core project right now - only at the very beginning. Just doing this for fun really, and there is not a huge chance of this being finished.
My run algorithm seems to be working solidly now - it is still not brilliant.
I have completed 2 overs of testing. Here is how my ball is determined.
There are 48 different places a ball can be delivered, ranging from a full toss from wide outside off, or an extremely short bouncer outside leg.
Each place in the pitch is given a value, for the bowler and batsman. Each batsman's values is individual, so a batsman might be better at playing certain areas than other.
The bowler is assigned skill and consistency. Consistency determines where the ball will land - the higher the consistency, the better place the ball will land - the ideal spot is on a good length outside off for a test match.
Each place in the pitch where a ball can land is given a value for bowling also which is fixed for all bowlers. Once a location is determined, the value is multiplied by the bowler's skill to find the 'BowlBall' value, which is the final value of how good a delivery it is.
For the batsman, a random number is now chosen between 4-25 which is then divided by 10. (I could've just done 0.4 to 2.5 but I am not sure how decimals fully work yet in C++ with random number selection). Next, it is determined where the ball has landed from the bowler, and we find out how good the batsman is in that area. Now, the random number is multiplied by the batsman's skill in the area which finds the BatBall value.
Finally, BatBall is divided by BowlBall, and whatever the number determines the result. The lower the number, the more runs scored.
I have assigned a good length outside off a value of 9, and an extreme bouncer outside leg a value of 0.5, which is the worst you can get.
I haven't added any extras (wides, no balls, byes, etc.) yet. Just pure runs.
I have tested two bowlers (Glenn McGrath and Brett Lee).
Glenn McGrath:
Consistency: 95
Skill: 80
Brett Lee
Consistency: 80
Skill: 95
These are two top notch bowlers, and I have made a batsman called Blake. He is a good opening batsman with solid attributes. Here is how the 5 overs panned out.
0.1 Glenn McGrath to Blake: Outside Off, Blockhole, 0 runs
0.2 Glenn McGrath to Blake: Off Stump, Blockhole, 0 runs
0.3 Glenn McGrath to Blake: Straight, Blockhole, 0 runs
0.4 Glenn McGrath to Blake: Straight, Blockhole, 1 run
0.5 Glenn McGrath to Blake: Straight, Blockhole, 0 runs
0.6 Glenn McGrath to Blake: Off Stump, Good Length, 0 runs
Only one batsman, no running between wickets yet.
A very full over from McGrath. Considering it is test match cricket, I might have to make shorter deliveries far more common. Still, a blockhole is a handy delivery here and tough to score from.
Batsmen 0/1 (1.0 overs)
Blake: 1* (6)
McGrath: 1-0-1-0
1.1 Brett Lee to Blake: Off Stump, Blockhole, 0 runs
1.2 Brett Lee to Blake: Leg Stump, Blockhole, 2 runs
1.3 Brett Lee to Blake: Outside Off, Low Full Toss, 4 runs
1.4 Brett Lee to Blake: Leg Stump, Blockhole, 0 runs
1.5 Brett Lee to Blake: Straight, Good Length, 2 runs
1.6 Brett Lee to Blake: Outside Off, Blockhole, 2 runs
Expensive over from Brett Lee. Lee's consistency isn't as good, meaning the ball doesn't always find the best areas, but his skill is higher, giving him a better chance of taking a wicket. Still, the run rate is a little high for a test match.
Batsmen 0/11 (2.0 overs)
Blake: 11* (12)
Lee: 1-0-10-0
2.1 Glenn McGrath to Blake: Off Stump, Blockhole, 0 runs
2.2 Glenn McGrath to Blake: Wide Off, Good Length, 2 runs
2.3 Glenn McGrath to Blake: Wide Off, Good Length, 3 runs
2.4 Glenn McGrath to Blake: Straight, Blockhole, 1 run
2.5 Glenn McGrath to Blake: Wide Off, Good Length, 2 runs
2.6 Glenn McGrath to Blake: Straight, Blockhole, 0 runs
Turning out a bit more like One Day cricket now. Perhaps I should change it to that. Good start anyway for the batsman.
Batsmen 0/19 (3.0 overs)
Blake: 19* (18)
McGrath: 2-0-9-0
3.1 Brett Lee to Blake: Off Stump, Good Length, OUT
3.2 Brett Lee to Blake: Outside Off, Blockhole, 2 runs
3.3 Brett Lee to Blake: Off Stump, Blockhole, 2 runs
3.4 Brett Lee to Blake: Outside Off, Low Full Toss, 4 runs
3.5 Brett Lee to Blake: Leg Stump, Blockhole, 1 run
3.6 Brett Lee to Blake: Wide Off, Good Length, 2 runs
Batsmen 1/30 (4.0 overs)
Blake c Gilchrist b Lee 19 (19)
Blake 2: 11* (5)
Lee: 2-0-21-1
Brett Lee gets the breakthrough in an eventful over, it was pitched on a good length and the worst possible random number for the batsman is never a good sign.
4.1 Glenn McGrath to Blake: Off Stump, Good Length, 0 runs
4.2 Glenn McGrath to Blake: Straight, Blockhole, 0 runs
4.3 Glenn McGrath to Blake: Off Stump, Blockhole, 0 runs
4.4 Glenn McGrath to Blake: Off Stump, Blockhole, 0 runs
4.5 Glenn McGrath to Blake: Outside Off, Good Length, 0! runs
4.6 Glenn McGrath to Blake: Off Stump, Blockhole, 0 runs
Maiden over from McGrath, including a perfect ball on a good length outside off. Blake probed at it but it fell short of first slip.
Batsmen 1/30 (5.0 overs)
Run Rate: 6.00
Blake c Gilchrist b Lee 19 (19)
Blake 2: 11* (11)
McGrath: 3-1-9-0
So, there we have it, the first 5 overs using my algorithm. Now that I look at this I find out that I need to include far more short deliveries and way less blockholers as it is quite rare to see a delivery pitched in the blockhole in a test match, let alone 3 every over.
Solid start anyway by my sim. Tweaking needed but it is looking decent anyway.
