testDM: testDM

Description Usage Arguments Details Value

View source: R/DM.R

Description

Use this to debug under multiple circumstances and to see how your function compares with the par function The mean for the par function (with n=500) on this is 172.734, and the sd is approximately 39.065.

Usage

1
2
testDM(myFunction, verbose = 0, returnVec = FALSE, n = 500, seed = 21,
  timeLimit = 250)

Arguments

myFunction

The function you have created to control the Delivery Man game.

verbose

Set to 0 for no output, 1 for a summary of the results of the games played (mean, standard deviation and time taken), and 2 for the above plus written output detailing seeds used and the runDeliveryMan output of the result of each game.

returnVec

Set to TRUE if you want the results of the games played returned as a vector.

n

The number of games played. You will be evaluated on a set of 500 games, which is also the default here.

timeLimit

The time limit. If this is breached, a NA is returned.

Details

Your final result will be based on how your function performs on a similar run of 500 games, though with a different seed used to select them.

This set of seeds is chosen so as to include a tricky game that has pick ups and deliveries on the same spot. This will occur in the actual games you are evaluated on too.

While this is dependent on the machine used, we expect your function to be able to run the 500 evaluation games on the evaluation machine in under 4 minutes (250 seconds). If the evaluation machine is slower than expected, this will be altered so that the required time is 25

The par function takes approximately 96 seconds on my laptop (with n=500 and verbose=0).

Value

If returnVec is false, a scalar giving the mean of the results of the games played. If returnVec is TRUE a vector giving the result of each game played. If the time limit is breached, a NA is returned.


emanuelbodin/DeliveryMan documentation built on Nov. 4, 2019, 11:52 a.m.