|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
#1 (permalink) |
|
All Star Starter
Join Date: Dec 2001
Location: Newburgh, NY
Posts: 1,869
|
Random Database Question for Utility
I have created a little app in Visual Foxpro that will create random debut files in 2 clicks. Yeah I could do it in one, but I split up the random debut generator and the export into two different parts. Anyway, its kind of crude right now, as I have some hard coded paths and havnt included an open dialog box yet so you can choose a database (I current have to copy the .csv files into a folder, but Id like to add in an open dialog), but its workable, and the whole routine takes about 20 seconds to finish.
My question had more to do with how you use, or would like to use, random databases. The way it is now, I have the program modify .csv files that are in a certain directory, and have the year range hard coded from 1900-2006. Im going to change it so that the user can choose the range in years. However, Im using the original Lahman DB as my data, and in 1903, with the historical modifications on, Im still getting guys blasting a ton of HR's, and guys from the 1800's stealing a ton of bases. Lance Berkman and Kent Hrbek tied for teh HR title in 1903 with 46 HR's. Having never used a random debut database before this, are you better served using a normalized database, or should I just let it go with the original Lahman DB and see where it goes ?
__________________
Well, I don't really think that the end can be assessed as of itself as being the end because what does the end feel like? It's like saying when you try to extrapolate the end of the universe, you say, if the universe is indeed infinite, then how - what does that mean? How far is all the way, and then if it stops, what's stopping it, and what's behind what's stopping it? So, what's the end, you know, is my question to you. Last edited by Nukester : 06-12-2007 at 08:46 PM. |
|
|
|
|
|
#2 (permalink) |
|
Hall Of Famer
Join Date: Jan 2003
Posts: 2,580
|
I'm really interested in anything you come up with along these lines.
__________________
OOTP beta tester for second year. Commissioner of new Arcanum league starting with 1929 historical season. Will Charlie Root (avatar at left) be pitching in the 1929 World Series like real life? |
|
|
|
|
|
#3 (permalink) |
|
All Star Starter
Join Date: Aug 2003
Location: Kenosha, Wisconsin
Posts: 1,820
|
I already have one created although the end user needs ACCESS to use. I have it posted on PadresFan website. It basically does what you are doing and can use any database that the user wants to use as long as it is entered into the folder within my Access program.
I was going to work on a database using the DT translations and normalize the stats. My database already normalizes the fielding ratings/stats. It is good to have multiple utilities out. If you get the time check out mine and let me know what you think. Very easy to use but does require 1 import and 1 export of files into the database. I was going to convert mine into a VB program when time permits so that it would not require MS Access for the end user to use the utility. Last edited by SandMan : 06-13-2007 at 10:25 AM. |
|
|
|
|
|
#4 (permalink) | |
|
All Star Starter
Join Date: Dec 2001
Location: Newburgh, NY
Posts: 1,869
|
Quote:
Basically the way I have it set up now is you copy the .csv files into a folder and press a button in the application. The app will create new random debut years for all players, also changing the pitching, batting, fielding, and fielding OF files to match the new years. Then another press of a button exports the files back out as .csv files and they are ready to use. A couple of things I want to put in is a dialog box so the user doesnt have to copy files over to a certain directory, and make it so that a certain number of guys enter the first year. A few of my tests have created really good leagues, and some have created leagues where there were too few players in the initial year for every team to have enough guys. For instance, last night before going to bed, I ran the utility and started a league in 1903, but all teams only had about 14 players, and some didnt have any of a certain type of position (My Highlanders didnt have a firstbaseman on the initial roster). After a few tweaks, Ill probably package this up for others to use. You wont need Foxpro to run it, as Ill supply the needed .dll files in order for it to run on a machine without Foxpro. Im not sure when that will be (as I said, its workable right now on my own PC) but Ill try and have something out sometime soon. What are you experiencing as far as early century stats ? Are more current players still racking up 40+ HR's in the deadball era with your utility ?
__________________
Well, I don't really think that the end can be assessed as of itself as being the end because what does the end feel like? It's like saying when you try to extrapolate the end of the universe, you say, if the universe is indeed infinite, then how - what does that mean? How far is all the way, and then if it stops, what's stopping it, and what's behind what's stopping it? So, what's the end, you know, is my question to you. Last edited by Nukester : 06-13-2007 at 12:19 PM. |
|
|
|
|
|
|
#5 (permalink) |
|
All Star Starter
Join Date: Aug 2003
Location: Kenosha, Wisconsin
Posts: 1,820
|
If you get the chance just download mine and take a look at what it is. Basically there are no Excel Macros. Just a front end that sets 2 parameters for the start and end year of the randomizer and a function that creates a new random debut year. The excel sheet is then imported into Access and then there are three Macros that need to be run in the Access database. The macros are simply a call to the queries to write the tables. The last step is to export the 5 tables to csv files. This all would be best in a program, but I did not have VB installed on my current pc and have to find my cd-roms to re-install (after a move - it is in a box somewhere....)
Overall I was happy with the data returned from actual seasons played. By all means the database is not normalized so from that prospective Ty Cobb is still a .360 hitter with more triples than homers, whereas in a normalized database he will hit for a lower average but produce more homers. I was going to release the DT in a format to be used with the random debut utility but have not had a chance yet and was not going to release this with all 18,000 players but a reduced set. By default the parameters are set to randomize the years 1-5 seasons prior to league creation. With 16000 players in a 110 year period you get about 160 players a year entering the pool. That would give you 800 players in an inaugural draft or about 50 per team with 16 teams. If you want more teams you simply shorten the parameters to allow more players per season in the draft. After the first draft you can increase the teams, it will just shorten the draft from about 10 rounds to a lower number of rounds, but since the players are all MLB quality this is fine. I could go on and on about this - but I think if you simply downloaded the utility analyzed the queries and the macros you will see how easy this was and it works with all databases in the Lahman format. You probably are doing pretty much what my queries are doing, just using a different program and having the runtime to allow it to be more of a program rather than a utility requiring a RDBMS. I have on my PC every player who played the game in a normalized setting. I wrote my own normalization of fielding stats that is included in the download. I did this because all the players prior to 1920 were severly handicapped in the field, even if they were exceptional defensive players in their own time. With the defense being normalized it makes it more tolerable that you have power hitters, playing with high average hitters, speed demons, high endurance and low endurance pitchers because of the era they came from. With the DT stats this will change. Regards, Sandman |
|
|
|
|
|
#6 (permalink) |
|
All Star Starter
Join Date: Dec 2001
Location: Newburgh, NY
Posts: 1,869
|
I will definitly check out your utility. It sounds a little more streamlined than mine at the moment. I was pretty much throwing something together in my spare time at work, and really didnt expect to end up with something for the public. I think my biggest concern at the moment is that my utility doesnt really account for the number of players per season, which is fine for amatuer drafts, but not good for the starting year. After playing around with my application, I think this type of league will be alot of fun, so Ill check out your utility
__________________
Well, I don't really think that the end can be assessed as of itself as being the end because what does the end feel like? It's like saying when you try to extrapolate the end of the universe, you say, if the universe is indeed infinite, then how - what does that mean? How far is all the way, and then if it stops, what's stopping it, and what's behind what's stopping it? So, what's the end, you know, is my question to you. |
|
|
|
|
|
#7 (permalink) |
|
Hall Of Famer
Join Date: Dec 2002
Location: Norwood, MA
Posts: 5,399
|
I would definitely be interested in this, especially since I don't have Access, so I was unable to use the other utility.
Have you thought of creating a utility that would "flip" a player's career? Meaning the stats from their final year would be listed as their debut season and continue in reverse order?
__________________
Commissioner - PBRL Time Warp Baseball - Boston Red Sox The Baseball Chronicle - Cleveland Spiders |
|
|
|
|
|
#8 (permalink) | |
|
All Star Starter
Join Date: Dec 2001
Location: Newburgh, NY
Posts: 1,869
|
Quote:
I did complete this program and have used it a few times on my own. You basically copy whatever database you want into a folder called Original, then run a .exe file, and a new database will be created. It is distributable as it is (I tested it on a laptop of mine that does not have Foxpro on it), but it was done pretty quickly (just so I could get on with using it). You would currently have to unzip a few files onto your C: drive, which would create a directory called RandomDebutApp. Inside that folder is where you would copy whatever database you want to use, into the ORIGINAL folder. Then run the .exe. All you have to do in the program itself is press a button to create the database, and press a button to export it to a folder within the RandomDebutApp called RESULTS. Then just copy those files to wherever your OOTP game is looking for them. Because of the way OOTP team names and stuff work, you have to do an release all players to free agents then run an initial draft. Also the way I have it set up now, the league must start in 1903, and usually have anywhere from 250-350 players in the first year. I just finished 1903 in a league I am using this for, and guess who won the HR title ? Yep, you guessed it, Pedro Munoz with 16 it seems that you have to tinker with the league totals for the first season (or else you will get guys hitting 40+ HR's in 1903ish), but after the first season, the game corrects itself with the adjusting of historical modifiers. Its been fun if not a little crude still, but it takes 20 seconds to get the database created
__________________
Well, I don't really think that the end can be assessed as of itself as being the end because what does the end feel like? It's like saying when you try to extrapolate the end of the universe, you say, if the universe is indeed infinite, then how - what does that mean? How far is all the way, and then if it stops, what's stopping it, and what's behind what's stopping it? So, what's the end, you know, is my question to you. Last edited by Nukester : 07-03-2007 at 08:17 PM. |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|