A device for improving cardiac performance associated with a current set of N pacing parameters by adjusting the N cardiac pacing parameters, where N is an integer, the device comprising: a sensing circuit that determines cardiac performance associated the current set of N pacing parameters and cardiac performance associated with random sets of test pacing parameters;