• Welcome to the Cricket Web forums, one of the biggest forums in the world dedicated to cricket.

    You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join the Cricket Web community today!

    If you have any problems with the registration process or your account login, please contact us.

*Official* NP Cricket Simulator: Updated Version (16-04-2020)

Neil Pickup

Request Your Custom Title Now!
kears_falcon_9 said:
Im not sure lol is he going back to BC 2006 or is he contructing a new sim for CW XI. (And maybe WCC)
Same thing. Initial development will be for CWXI, and then it will become BC2006, by turning down the bounce a lot!
 

Neil Pickup

Request Your Custom Title Now!
Time for another progress report.

I'm going to try to break down what the code does into standard English, so everyone including Halsey and Jamee can understand what I'm trying to do

1) Bowler lets go of ball, aiming at the place set by the sliders
2) Batsman sees ball out the bowlers hand and calculates where it's going to end up at his end
3) Batsman compares the quality of the ball with the match situation and decides what sort of shot
4) Ball is delivered, game calculates where the ball ends up at the batsman's end (not necessarily where the batsman thinks it will)
5) Batsman plays one of six shot types

At present, steps 1-4 are complete for pace bowlers only, and the first shot type (the "block or leave") is half-written, in that I've added the steps for "batsman leaves ball, goes through to keeper" and "batsman leaves ball, gets bowled" - nothing LBW-related yet. LBWs on leaving are the next step (pitching in line, wrong decisions, etc, etc) - and following that we'll try blocking (with all possible permutations - "block successfully", "try to block but miss and get bowled/get LBW" (that will just be an extension of leave) and "try to block but edge it to slip"... then there's always "block but edge onto pads and be given out by the umpire anyway", and "try to block and loop it up to gully, short leg".

Gah, this is getting harder by the second! Anyone think of other permutations of the block/leave?
 

Neil Pickup

Request Your Custom Title Now!
Okay, last night I wasted three hours of my life.

I *thought* that I had found a bug whereby erratic bounce caused bowlers to bowl wides, and spent those hours picking through the program in infinite detail trying to find out why, even plotting entire innings' distributions of line, length and movement to try to find the inaccuracy.

Turned out that all these distributions were the same, and all that was causing the increased number of wides was the fact that the batsmen were leaving much, much more outside off stump under the erratic conditions - balls that had four all over them if they had been confident where they'd end up, they left instead, and took the wide(s).

I think that's a good thing, as it shows there's a good deal of thinking going on in the code :)
 

Cloete

International Captain
Woah! That sounds amazingly realistic, looking forward to hittign a few tons on it for the CWXI :D

Top stuff, keep it up mate!
 

Glenn Stiemens

School Boy/Girl Captain
Neil Pickup said:
Time for another progress report.

I'm going to try to break down what the code does into standard English, so everyone including Halsey and Jamee can understand what I'm trying to do

1) Bowler lets go of ball, aiming at the place set by the sliders
2) Batsman sees ball out the bowlers hand and calculates where it's going to end up at his end
3) Batsman compares the quality of the ball with the match situation and decides what sort of shot
4) Ball is delivered, game calculates where the ball ends up at the batsman's end (not necessarily where the batsman thinks it will)
5) Batsman plays one of six shot types

At present, steps 1-4 are complete for pace bowlers only, and the first shot type (the "block or leave") is half-written, in that I've added the steps for "batsman leaves ball, goes through to keeper" and "batsman leaves ball, gets bowled" - nothing LBW-related yet. LBWs on leaving are the next step (pitching in line, wrong decisions, etc, etc) - and following that we'll try blocking (with all possible permutations - "block successfully", "try to block but miss and get bowled/get LBW" (that will just be an extension of leave) and "try to block but edge it to slip"... then there's always "block but edge onto pads and be given out by the umpire anyway", and "try to block and loop it up to gully, short leg".

Gah, this is getting harder by the second! Anyone think of other permutations of the block/leave?
I can understand your plight Neil. For Cricket Coach's match engine a lot of rebuilding had to be done (over MVCM) - to the extent that by the time of release it will be a complete rewrite in essence.

I'm not sure of the actual ambitions of your match engine (or how you intend to represent the outcomes of the match engine to the user) but one point worth considering is whether or not you can 'mask' certain outcomes from the user. I remember discussing this with Marc Vaughan a few years ago - often the match engine just needs to give out the belief of realism and can in certain areas almost fooling the user into believing that it is doing something more complicated than it is.

There are more outcomes to the leave - how about leave and fails to evade ball, causing an edge. Of course from that you have several outcomes in itself - does it go through to keeper/slip or lob up to the bowler/close in fielders, or does it go flying away of the glove to third man? Or maybe it just drops to the ground.

I have to say that I admire the level of detail that is going into this - if you can get all these various branches into the match engine, it will make the task of producing nice and detailed text commentary for example much easier.

We are going down a similar road to yours for Cricket Coach - without going into too much detail we follow the same basic flow (that pretty much reflects what happens in real life out on the pitch). However it is appears to be the case that your engine might be a bit more true to life in terms of how a decision is made - in CC we mainly look at the actual line/length of the bowler and then make the decision for the batsman from that. Of course a batsman's intelligence affects which shot. Conditions such as spin/bounce etc then affect the outcome.

While some gamers out there might be thinking that this will perhaps create a less realistic outcome (and in some regards it will) for the purposes of creating an illusion of a cricket match in progress it is more than successful.
 

Neil Pickup

Request Your Custom Title Now!
I've just put another couple of hours into the leave, so it now simulates LBWs (given both out and not out, correctly and incorrectly) plus leg-byes (which I'm not overly happy with, but like you say so long as it gives a realistic looking outcome then it's not too much of an issue, especially for a less relevant area of the game.

The general idea for presentation of output is as a cricinfo-style ball-by-ball commentary (example log attached, only pay attention to where there's extended commentary - the other "no run" situations just mean "other shot type played, but no code so no outcome".

As far as the "unsuccessful leave" goes, thanks for the idea, I'll just adapt the (yet to be written) code for "unsuccessful defensive shot" to happen for an X percentage of leaves played, where X is dependent on the bowler.

I've also attached the current match engine, if anyone fancies a play (read the above and take it into account before commenting, there's probably very good reasons for apparent "bugs"!)
 

Attachments


Top