A Game of Billiards in Empirical Modelling

Download Report

Transcript A Game of Billiards in Empirical Modelling

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
Presentation Overview (2)
 Summary of Functionality
 Problems Encountered
– What Were They?
– How Were They Dealt With?
 Future Extensions
 Summary and Conclusion
 Questions
Background to the Project
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
 Joined EM Group in Summer 2003
 What 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
Choice of Model to Use
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
 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
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
 Moissenkov’s Level 1 very limited
 Implemented a complete table, with
pockets and ball re-spotting
 Added a level loader
 Added a reset button
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
Level 2
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
 Moissenkov simply added friction
 Implemented extra balls, complete with
ball-respotting
 Implemented cue ball repositioning
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
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
Level 3
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
 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
Level 4
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
 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
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
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
 Completely 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
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
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
 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
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
Summary of Functionality (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
 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
Summary of Functionality (2)
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
 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
Problems Encountered
What went wrong…
Background
EM
Project Choice
Development
Level 1
Level 2
Level 3
Level 4
Level 5
Level 6
 Time Management not the issue!
 Spin is a complex and little-understood
mathematical problem
 Potting a ball is easy
Summary of
Functionality
Problems

What they were
Solutions
Extensions
Summary +
Conclusion
 Calculating in-offs and cannons is not
 Rules of inherited model were poor
Problems Encountered
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
 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
Extensions
Summary +
Conclusion
 More on this in demonstration
Future Extensions
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
 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
Summary and Conclusion
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
 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!
Questions?
Richard Coleman
2004