Virtual Moneyball A Baseball League Simulator By Ryan
Virtual Moneyball A Baseball League Simulator By Ryan Kroening http: //compsci. snc. edu/cs 460/kroera
Project Definition n In Brief: n n Create a program to allow the creation of fictional MLB teams and simulate their performance over a number of seasons. Track any and all appropriate player and/or team statistics for research purposes n Why Do We Care: The Economics of Sports n n n The Salaries of Sports Stars Worker Exploitation The Problem of Data
Detailed Project Requirements n Three Key Components to the Program n Drafting n n n Statistics n n n Different Draft Philosophies Steinbrenner or Beane? What Wins Games? Batting or Pitching? Simulation n n Deterministic …yet Random n Other Requirements n n n Manage Multiple Teams/Leagues Between Season Alterations Reporting
Baseball Solved in Two Parts n Microsoft Access Database n Models the Desired League Structure n Stores User Data n Keeps Statistics n C# n User Interface n Simulation Component n Reporting (Crystal Reports)
Solid Management – Database Solution n Function #1 – Store Player Statistics
Solid Management – Database Solution n Function #2 – Model a Baseball League Commissioner Schedule League Results Teams Pitchers Draft Philosophy Batters
Solid Management – Database Solution n Other Components n Available vs. Taken Players Teams n Selected Pitchers Selected Batters Master Player Table Keeping Historical Data – Season ID Variable
Sharp On-Field Talent – C# Solution n Program Flow Models DB Model
Sharp On-Field Talent – C# Solution n Simulation Component – What Wins Games?
Sharp On-Field Talent – C# Solution n Simulation Component – Money, Talent, and Luck
Sharp On-Field Talent – C# Solution n Reporting
Making Cuts – Database Exceptions n Microsoft Access – A Bit Pudgy n How Granular to Make the Data? Pitchers Stats Batters What Stats Matter? Stats n What Does User Have Control Over? Commissioner League (all) Teams (one)
Making Cuts – Interface Exceptions n “To-The-Point” Interface n Fixed Player List n Multiple Draft Philosophies n Reporting Options n Data Dump vs. Full Calculation n More, More
Methodology n Solid Database Model n Rapid Prototyping n Get Something Working! n Dual-Program Design n n Interface Functional n “One Piece a Day” n n n Pick a Function/Task Get Something Working! Debug Save It Put Pieces Together Later
Demonstration n Will almost certainly outperform the Brewers…
Strategies for Learning n New Skills Acquired n C# n Visual Studio 2008 Development n Building a DB from Scratch n Learning/Developing at the Same Time n Trial and Error (Get Something Working!) n On-the-Job Training n The Internet n Google “C# AND …” n MSDN
From the Classroom to the Diamond n Database Theory/Modeling n Good Model Easier Coding n Program Flow Comes Naturally from Model n OOP Principles n Break Program Apart Into Chunks n Functions and Classes/Objects n Programming Language Theory n Need to Learn, and Learn Fast n Understood General C# First, Specifics Later
Expansion Teams/Program Extensions n Migrate from Microsoft Access to SQL Server n Performance Boost n LINQ vs. Data. Set n Player Level Statistics n Randomize Individual Game Performance n Change Player Stats Throughout Season n Dynamic AI n Automatically Add/Drop Players During Season n Trade Between Teams n More Detailed Reports
Advice From An Old Pro n Get Something Working! n Obey Your Timeline n Be Honest With Yourself n “One Piece a Day” n Use Your Resources n CS Faculty n Coworkers, Friends, Past Seniors, etc. n Exercise! (trust me)
Thanks/Q&A n Thanks to the Following People for Helping Me Out: n n n The Entire SNC Computer Science Faculty Dr. Kevin Quinn The IT Department at Enzymatic Therapy n Questions and Comments from the Audience?
- Slides: 20