a game of billiards in empirical modelling richard coleman

24
A Game of Billiards in Empirical Modelling Richard Coleman

Upload: sierra-turberville

Post on 15-Dec-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A Game of Billiards in Empirical Modelling Richard Coleman

A Game of Billiards in Empirical Modelling

Richard Coleman

Page 2: A Game of Billiards in Empirical Modelling Richard Coleman

Presentation Overview (1)

Background to the Project– Involvement with the EM Group– What is EM?– Choice of Project to Take Over

Development– Level 1– Level 2– Level 3– Level 4– Level 5– Level 6

Page 3: A Game of Billiards in Empirical Modelling Richard Coleman

Presentation Overview (2)

Summary of Functionality

Problems Encountered– What Were They?– How Were They Dealt With?

Future Extensions

Summary and Conclusion

Questions

Page 4: A Game of Billiards in Empirical Modelling Richard Coleman

Background to the Project Joined EM Group in Summer 2003What is Empirical Modelling?

– Modelling the “Real World” using:• Observables, which are constants about the

domain being modelled

• Dependencies, which hold between the Observables

• Agents, which cause changes to the Observables and the system

– Attempts to bridge divide between “Real World” and the formality of Logic & Maths

– www.dcs.warwick.ac.uk/modelling

Background EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 5: A Game of Billiards in Empirical Modelling Richard Coleman

Choice of Model to Use

Three existing models in EM archive:– Simon Yung, 1996– Alexei Moissenkov, 1999– Ben Carter, 1999

Chose to use Moissenkov 1999 because:– Good use of levels– Easy to extend– Lack of complexity found in others

Background

EM Project

Choice

Development

Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 6: A Game of Billiards in Empirical Modelling Richard Coleman

Level 1

Moissenkov’s Level 1 very limited

Implemented a complete table, with pockets and ball re-spotting

Added a level loader

Added a reset button

Background

EM

Project Choice

Development Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 7: A Game of Billiards in Empirical Modelling Richard Coleman

Level 1

Background

EM

Project Choice

Development Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 8: A Game of Billiards in Empirical Modelling Richard Coleman

Level 2

Moissenkov simply added friction

Implemented extra balls, complete with ball-respotting

Implemented cue ball repositioning

Background

EM

Project Choice

Development

Level 1 Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 9: A Game of Billiards in Empirical Modelling Richard Coleman

Level 2 (Moissenkov)

Background

EM

Project Choice

Development

Level 1 Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 10: A Game of Billiards in Empirical Modelling Richard Coleman

Level 2 (Coleman)

Background

EM

Project Choice

Development

Level 1 Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 11: A Game of Billiards in Empirical Modelling Richard Coleman

Level 3

Moissenkov added balls and replay facility

Filtered out replay code and made it into a completely separate level

Replay available at the touch of a button

Background

EM

Project Choice

Development

Level 1

Level 2 Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 12: A Game of Billiards in Empirical Modelling Richard Coleman

Level 4

Level at which rules are added

Includes scoreboard, and detection of all types of shots

Graphically looks similar to Moissenkov’s top level

Functionally similar to Moissenkov too

Background

EM

Project Choice

Development

Level 1

Level 2

Level 3 Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 13: A Game of Billiards in Empirical Modelling Richard Coleman

Level 4 (Coleman)

Background

EM

Project Choice

Development

Level 1

Level 2

Level 3 Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 14: A Game of Billiards in Empirical Modelling Richard Coleman

Level 5Completely new level, implementing

Spin (aka “English”)

Spin chosen by clicking on ball image on RHS

Selection image changes colour according to whose shot it is

Calculations include spin off of cushions

Background

EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4 Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 15: A Game of Billiards in Empirical Modelling Richard Coleman

Level 5

Background

EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4 Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 16: A Game of Billiards in Empirical Modelling Richard Coleman

Level 6 Implements a playable Artificial

Intelligence

Calculates 3 types of shot:– Pot– In-Off– Cannon

Chooses and takes most appropriate shot

Skill and “Adventurousness” can be varied using scrollbars

Background

EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4

Level 5 Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 17: A Game of Billiards in Empirical Modelling Richard Coleman

Level 6

Background

EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4

Level 5 Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 18: A Game of Billiards in Empirical Modelling Richard Coleman

Summary of Functionality (1)

Completely working 4-layered Billiards model, based on but an improvement of billiardsMoissenkov1999

Improvements include:– Restructuring of layers– Addition of a model reset facility– Addition of a level loader

Background

EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 19: A Game of Billiards in Empirical Modelling Richard Coleman

Summary of Functionality (2)

Partial implementation of cue ball spin– Interface completed and functional– Problems with Physics

Partial implementation of fully playable Artificial Intelligence

How is it an Empirical Model?– More on this in project demonstration

Background

EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 20: A Game of Billiards in Empirical Modelling Richard Coleman

Problems Encountered

Time Management not the issue!

Spin is a complex and little-understood mathematical problem

Potting a ball is easy

Calculating in-offs and cannons is not

Rules of inherited model were poor

What went wrong…Background

EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems What they

were

Solutions

Extensions

Summary + Conclusion

Page 21: A Game of Billiards in Empirical Modelling Richard Coleman

Problems Encountered

Main focus on AI, since Spin has been looked at in previous projects

Recognition that in-off and cannon are essentially the same shot

Attempt to build an approximation method for in-offs– Problems with pockets and table orientation

More on this in demonstration

Attempted Solutions…Background

EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 22: A Game of Billiards in Empirical Modelling Richard Coleman

Future Extensions

Fix implementations of Spin & AI– May be completed before Report

Implement AI taking shots off cushions

Implement AI learning and improving its play– Possibly through use of an EDDI database

Convert Non-AI levels to dtkEden– Two player game over a network

Background

EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 23: A Game of Billiards in Empirical Modelling Richard Coleman

Summary and Conclusion

Model has come a long way since Moissenkov

Spin a slight disappointment but may be (relatively) easily fixed

AI does take shots

Plenty of scope for extension / improvement by myself and / or others– Perhaps next year’s project students!

Background

EM

Project Choice

Development

Level 1

Level 2

Level 3

Level 4

Level 5

Level 6

Summary of Functionality

Problems

What they were

Solutions

Extensions

Summary + Conclusion

Page 24: A Game of Billiards in Empirical Modelling Richard Coleman

Questions?

Richard Coleman

2004