Controlling game length

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Controlling game length

markus
I'm looking at the gamespec and wondering about the behavior of the server w.r.t. simulation length.

Basically, what I'm trying to do is to run an extremely short game to test some technical behavior of my broker. I uncommented and modified the following lines in ./config/server.properties

common.competition.minimumTimeslotCount = 1
common.competition.expectedTimeslotCount = 1

and run the simulation as follows

mvn -e -Pcli -Dexec.args="--sim --boot-data ... --jms-url ... --config config/server.properties --brokers LARGEpower"

My reading of pp. 30-31 of the current gamespec is, that that should give me a game with one+ regular timeslots after the bootstrap period. Following the example from p. 31, the probability of seeing something longer than, say, 150 timeslots should be in the single digits. Yet, whenever I run this I'm getting 360 regular timeslots *beyond* the bootstrap length. Is this the intended behavior, and if so why?

Cheers,

Markus

Reply | Threaded
Open this post in threaded view
|

Re: Controlling game length

grampajohn
Administrator
markus wrote
Basically, what I'm trying to do is to run an extremely short game to test some technical behavior of my broker. I uncommented and modified the following lines in ./config/server.properties

common.competition.minimumTimeslotCount = 1
common.competition.expectedTimeslotCount = 1
I run short games for testing all the time. So I did what you suggested, and set the min and expected count to 1, ran the sim, and it indeed ran one timeslot and stopped normally.

The computed game-length is recorded in the trace log - if you grep for "length" you should see something like this:
11068 INFO  server.CompetitionControlService: game-length 1(k=0.0, roll=0.929676448374098)
'
Cheers -

John
Reply | Threaded
Open this post in threaded view
|

Re: Controlling game length

markus
While I do get a game length of 1 in the log, I'm still getting longer games. Here are two examples from games that I started and then aborted after ~50 timeslots:

game-length 1(k=0.0, roll=0.11848174298778358)
game-length 1(k=0.0, roll=0.4208322572183769)

I'm running the 0.5.1 version of the server straight from the Maven repo.

Cheers,

Markus
Reply | Threaded
Open this post in threaded view
|

Re: Controlling game length

grampajohn
Administrator
markus wrote
I'm running the 0.5.1 version of the server straight from the Maven repo.
I tested the current master branch from github. It's possible that the 0.5.1 version is defective in this regard, but I do not have time to chase it down. You would be welcome to check through the commits in server-main since then and see if you can find the fix, but I do not recall doing anything that would change that particular behavior.

Is there a reason you cannot use the current version? It should all be deployed to the Sonatype snapshot repo, so you don't even need source. There's even a current distribution bundle for it.

Cheers -

John