utils/tune-hash.js
function getDepth(history) {
    var total= history[0];
    for (var n=1; n < history.length; n++) {
        total = total + (n * n * history[n]);
    }
    var result = total / agents.length;
//    console.log("total=" + total+", result=" + result);
    return result;
}
function getDepth(history) {
    var total= history[0];
    for (var n=1; n < history.length; n++) {
        total = total + (n * n * history[n]);
    }
    var result = total / agents.length;
//    console.log("total=" + total+", result=" + result);
    return result;
}
function getDepth ( history ) { var total = history [ 0 ] ; for ( var n = 1 ; n < history . length ; n ++ ) { total = total + ( n * n * history [ n ] ) ; } var result = total / agents . length ; //    console.log("total=" + total+", result=" + result); return result ; }
find the average search depth. Include the null entries for cost.

@param history of hash table.
@rtype Number.
find the average search depth . Include the null entries for cost .