Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is an interesting problem, but I don't see the utility of this. Are you making a simulation? </p> <p>In any case, if I were in your position, I would have done the following for each ball, assuming you have all the relevant data corresponding to the players.</p> <p>I would break this into 4 stages and each outcome is defined by</p> <p><strong>a. Strategy</strong></p> <p><strong>b. Strength</strong></p> <p><strong>c. Randomness</strong></p> <p><strong>d. State of previous stages.</strong></p> <ol> <li><p>Define the fielding positions. According to the bowling team strategies, I would place my strong fielders in the critical <a href="http://en.wikipedia.org/wiki/Fielding_%28cricket%29" rel="nofollow">positions</a>. This could be done by a mix of strategy and some randomness.</p></li> <li><p>Define the ball. This would depend upon the bowler's skill (spinner/fast bowler/swing bowler), match situations(yorkers at the end of the innings etc), some random factors, and some rules(one bouncer per over etc)(See <a href="http://en.wikipedia.org/wiki/Bowling_%28cricket%29" rel="nofollow">here</a>). The result of this stage is a perfectly defined ball position/speed/orientation near the batsman (basically the trajectory).</p></li> <li><p>Define the stroke. This would depend upon the batsman's strength, match situations, some randomness and most importantly the definition of the ball from stage 2 (See [here])<a href="http://en.wikipedia.org/wiki/Batting_%28cricket%29" rel="nofollow">3</a>. This would define the next trajectory/ speed.</p></li> <li><p>Define the fielding. This is the most crucial for you w.r.t your question. Now this depends upon the field placements as per stage 1, fielder strength, and most crucially the definition of the ball trajectory from stage 3. Depending upon these factors, it could be a catch, or 0,1,2,4,6 runs. Some obvious implementations could be that if the position of the ball is almost bisecting two fielders and no other fieleders are nearby and if the speed of the ball is good enough to reach the boundary, it is 4 runs. Here you will have to implement the physics of the ball trajectory properly in stage 4. Not only this, if the trajectory is without touching the ground and if there is a player nearby this could be defined as a catch, if the ball has already touched the ground before reaching near the player, you could modify the trajectory to guide the ball back to the wicket keeper etc. Maybe you could implement simple rules here before getting into difficult situations such as run outs.</p></li> </ol> <p>Finally the ball is supposed to reach back to the bowler.</p> <p>All the best.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload