Grand Slam Baseball

View the Forum Registry


0 Subject: creatign a baseball Sim

Posted by: axp113
- [2605228] Sun, Feb 04, 20:01

i am formerly yankeesRule, the one creating the draft league and future member of the p2 merger league. I am a computer science major and i have been doing some research on creating an online baseball sim similar to gsb.

I have a few questions and maybe you can help.

1. if I were to code a sim for baseball i would use visual C++.

2. Creating the web to be interactive I would use ASP programming.

3. To transfer data from the net to a database of some sort (most likely MS access database) i guess i would use cgi script or vbscript. THIS PART I AM UNSURE OF.

4. Then i would store the info in a database and use that data in my sim written in c++ to generate the random stats, then take the new stats and update the web page.

Does this sound right, are there any parts i am missing. Any technical input would help.

other key components:
1. hitting/pitching algorithms
2. randomness of hitters-(consistent, streaky, inconsistent, patient, high avg hitters, HR hitters, lefty, righty...)
3. Pitching algorithms-(technical, power, finesse, variety of pitches...)
4. defense-(all-purpose players, positional players, injuries, errors)
5. other factors-(weather conditions, ball park features, pitcher vs hitter, rare plays..)

thanks
axp113
1axp113
      ID: 2605228
      Sun, Feb 04, 20:03
summary:
1. Interface for users on the web.
2. Transfer new data from the web to a database
3. Use new data in simulator to create new data.
4. Update data on database and post it on the web
2WiddleAvi
      ID: 470341416
      Sun, Feb 04, 20:29
Beware of using a access datebase as it is limited to how many people can access it at once. So if a bunch of people log in you will have problems.
3axp113
      ID: 2605228
      Sun, Feb 04, 20:40
so something like oracle or db2 is better?
4WiddleAvi
      ID: 470341416
      Sun, Feb 04, 20:43
Oracle is pretty powerful....Maybe a SQL database. You have to think how many people you expect you play. Maybe start with Access when it's just a bumch of your friends but convert it to a SQL database later. Access can have about 20 people accessing it at once and about 1,000 hits a day.
5axp113
      ID: 2605228
      Mon, Feb 05, 10:52
ok i got some info from the commish of GSB and csfbl and I think the best way to go is either visual basic or visual c++ for the sim, sql server 7 or something and asp web pages
6MattG
      ID: 55139511
      Mon, Feb 05, 11:39
I am a CPS minor here at Ship AXP113 and I have been known to provide pretty good algorithms and logic skills, If you need any assitance at all I would love to volunteer my free time as much as possible, I write code for a hobby sometimes. I could show you my resume:

VFP, VB, JAVA, ACCESS, HTML, Visual C++, Borlan C++. =}
7Wammie
      ID: 20039259
      Mon, Feb 05, 14:41
MattG,
I write code because I got in the wrong line at college and ended up going into computers. any one in their right mind wouldn't write C++ or HTML code for fun! They would have to be crazy!

8Matt G
      ID: 35641319
      Mon, Feb 05, 22:28
Wammie, yeah but I write code for programs that I can use, it helps me to think I am accomplishing stuff, plus it helps me learn the stuff for class. I am crazy though, ever code drunk? its fun and its when i write my best stuff
9Wammie
      ID: 20039259
      Tue, Feb 06, 13:28
I have written code drunk. When I coded in college, I would drink heavily while writing code. It was the only way I could stay at the computer.

But what are you talking about Matt G, no one has ever written a program that they can actually use! There is always commerical sw out there better.
10yankeesRule
      ID: 310433012
      Tue, Feb 06, 13:31
does anyone have any "CODING" ideas for the simulator aince everyone seems to like writing code!!! Have a beer then think of something, it might help
11axp113
      ID: 310433012
      Tue, Feb 06, 13:32
oops, i guess i am still coming up as yR at this computer
12WiddleAvi
      ID: 48523260
      Tue, Feb 06, 14:26
Here is how I see it: Say you rate each category from 1 to a 100. Create a formula that compares the Pitchers numbers to the Hitters numbers and spit out a probabilty number from 1 to a 100 of who will win the battle. Lets say that it spits out the number 50. That means it is pretty evenly matched and it is 50% the hitter wins the battle and 50% the Pitcher. Now have the the computer spit out a random number from 1-100. Have the program assign values to eavery number from 1 to a 100 based on the percentage of each winning. So say in this case we said it was 50%. all the numbers from 1 to 50 will be a hit for the hitter. All the number from 51-100 will be an out. Based on the hitters stats the computer decided what kind of hit. So say he is a more average hitter then if the random # is between 1-30 it's a single, Between 31-40 it's a double, Between 41-44 its a triple and between 45-50 it's a HR. Now of course that will all depend on his ratings for each category. If he is high in GAP then assign more numbers to doubles, If it is high in speed more to triples, high in Power then more to HR. I forgot to throw in a walk as part of the numbers. If the nunber is over 50 then the pitcher wins it will be an out and depending on the pitchers rating will it be a groundout, Strikeout, or fly out etc. Hope that makes sense and helps. There is more of course like defense errors, Stolen bases. But this should be the basic start for you.
13Eustacio
      ID: 570531614
      Tue, Feb 06, 16:53
Bah, nobody cares about Cobol these days...
Grand Slam Baseball

View the Forum Registry




Post a reply to this message: (But first, how about checking out this sponsor?)

Name:
Email:
Message:
Ignore line feeds? no (typical)   yes (for HTML table input)


Viewing statistics for this thread
Period# Views# Users
Last hour11
Last 24 hours11
Last 7 days11
Last 30 days33
Since Mar 1, 2007524334