|
|
Due 04.Apr.20 (Tue) 22 (Thu) 17:00.
Before you tackle the homework, remind yourself of our general hw policies.
Reading:
Lecture covered
Rosen Sections 4.5, 6.2 (the homogeneous case), 6.3, 6.5.
Sections 11.2, 11.3 are variants on the finite-state machines given in lecture.
Separately, the hat-check problem (Section 6.6, derangements) is fun
and occasionally pops up in problems.
state: team2-to-serve input: Succeed [indicates team 2 served successfully.] state: team1-to-return2 input: Fail [oops, team 1 failed to return the ball.] state: team-2-to-serve ...Specify the 4-state FSM best modeling a volleyball game. Express your answer in table format.
1 Well, you might be writing code for MegaProVolleyballPlus, and the referee might actually be the physics simulator, which is calculating the outcome based on your or another module's output. (back)
2 We'll consider a return as a single event, and not model how it might be made up of up to three individual hits by one team. Clearly, you could certainly model the up-to-three hits by refining your FSM, though it might need inputs (the ref) distinguishing between a hit which wasn't a return but wasn't drop-the-ball either. (back)
3 This was how we played in my (dreaded) junior high PE; however more competitive volleyball might only allow re-serves when the serve hit the net; I'm not sure.
Regardless, Once a re-serve resolves, the botched serve is forgotten; thus there can be a re-serve every single volley. (back)
4 Well in real volleyball, there are apparently "rally points" in overtime, a mode where every play results in somebody getting a point. You can see that we could also model this, but it would require a referee input telling us to switch into rally mode, and would also mean a bunch more states. (back)
5 The direct way to model the points would be to augment our definition of FSM to allow a couple of integer variables, let certain states modify them, and allow transitions to depend on them.
It's more cumbersome (but possible) to do this even without augmenting the FSM with variables. For every possible score (how many possible scores are there?), we could make a copy of the simple FSM, and then tweak the scoring transitions. (back)
|
|
| Comp280 Home | Please notify us of any broken links, etc. | Last modified 2004.Apr.21. |