CSFBL Community

Community Forums for CSFBL and ComputerSims Baseball
Provided by ComputerSims, LLC
Welcome to CSFBL Community Sign in | Join | Help
in
Home Blogs Forums Photos Downloads

Developer Blogs

With the announcement of ComputerSims Baseball, a massive rewrite of CSFBL, there's lots of activity by the development team. We'll keep you up-to-date with the latest happenings in this blog.

First SimpleSim Update of 2007

I made only one New Year's Resolution this year and I broke it pretty much the first day I made it. Crying   Fortunately, I've been able to make up for it by working on it several hours last night and several more hours this morning so I'm still averaging 1 hour per day. Stick out tongue

The Steal Logic is fully ported to SimpleSim but it's not being called yet (I'll be working on this the rest of today).  When I first finished porting the Steal logic I tried to sim a game and it wouldn't get past the first batter.  Apparently, the sim engine doesn't like it when there's no pitcher assigned. Stick out tongue

I updated the team xml files to include a Starting Pitcher and I updated the LoadXML logic to load the Starting Pitcher from the xml and assign him as the current pitcher before the game starts.  Some of you may remember that Brian had said he already simmed a game with SimpleSim so the missing pitcher shouldn't have happened but a lot was changed from the time he simmed that first game to the time he shared the code with the rest of the dev team.   The missing Starting Pitcher was just one of several things that didn't work correctly.  It took some time to fix everything but I finally got it to sim an entire game (still without the Steal Logic) and it's fast...real fast.

Remember, this is a very simple engine, there is a lot of missing logic (no steal logic, no logic to pull the pitcher, no advanced baserunning like runners taking extra bases, no errors, etc).  The engine just does hits, walks, strikeouts, and regular outs and moves players around the bases and counts the runs properly.  Once all of the necessary logic is implemented it will slow the sim down a bit but I bet it'll be insignificant...especially compared to the current version.

You may have seen Brian's announcement about the fix he implemented that brought the sim time down from 15 seconds to about 5 seconds. Well...SimpleSim crushes that by a huge margin.  Here's the time stamps of 2 games:

Game 1:
Started:  12:42:50.6356250
Finished: 12:42:50.6668750

Game 2:
Started:  12:45:30.9325000
Finished: 12:45:30.9637500

 
A full game in three hundredths of a second?!? Now that's fast!  Even with all the full logic I bet it'll still be far less than a second! Party!!!

I've mentioned a few times that we are designing the game to be able to sim thousands of games at the same time instead of the way it is now where each game is simmed from beginning to end before it moves on to the next game. The new game will sim one play in one game and then move on to the next game and sim one play and so on.  When it gets to the end of the list of games it starts over and sims one play per game again.  So, the time we really need is how long it takes to sim one play instead of the whole game from start to finish.

I simmed a couple more games and put timers in between each play.  The engine simmed from the start of the game until the 4th before the timer increased at all and it ended with that same time.

Game Started:  12:53:27.5418750
Middle of 4th:    12:53:27.5575000
Game Finished: 12:53:27.5575000

Based on this data I don't think we'll have any problems handling 1,000+ games simming at the same time.  WOO!  Party!!!

I mentioned above that I was going to be working on adding in the Steal Logic.  I'm also going to work on adding a full roster and bullpen and add in the logic to pull pitchers. I'll make another blog post when I'm finished. Yes 

Published Saturday, January 06, 2007 3:06 PM by RickA
Filed under:

Comments

 

smartbenny24 said:

This is good to hear. Assuming 6000 games per cycle, even the relatively slow pace of 1 game per second would get everything done in less than 2 hours. If it's about 1/4 second like I hope, then that's about 25 minutes of fun :)

January 6, 2007 5:13 PM
 

Rewster said:

Is that with the updates to players stats and all?

January 6, 2007 8:59 PM
Anonymous comments are disabled
Powered by Community Server (Personal Edition), by Telligent Systems