Simulated race among three robots making random steps
You did not model the race correctly. The specification says:


  All three robots stop once one of them is one pace away from reaching 1km.


In your code, each robot runs the whole distance. The effect is that if you have one fast robot with a constant pace of 90 and one slow robot with a constant pace of 1, your code will make the slow robot win.

But at the time the race is over (after 12 steps), and at this point the slow robot is nowhere near the middle.

(Oh, there's one thing. When the paces are random, how can I know in advance whether the robot is one pace away? That gets complicated, but it is possible.)

Following the specification by the letter, the race has to be simulated very closely to the wording. That is, all robots start at the start, and in each step, each of them advances by its own pace.

Here is how I modeled the race:

'use strict';

class Robot {
    constructor(color, pace) {
        this.color = color;
        this.pace = pace;
        this.position = 0;
    }

    advance(distance) {
        this.position += distance;
    }
}

class Race {
    constructor(distance, robots) {
        this.distance = distance;
        this.middle = distance / 2;
        this.robots = robots;
        this.over = false;
        this.minMiddleDistance = this.middle;
        this.bestRobot = robots[0]; // Technically, it's a tie.
    }

    step() {
        // Calculate the robot's paces for this step in advance,
        // before actually advancing the robot's positions,
        // to satisfy the "one pace away from reaching" requirement
        // in combination with the "each pace is random" requirement.
        const paces = this.robots.map(robot =&gt; robot.pace());

        const raceLength = this.distance;
        this.over = this.robots.some((robot, i) =&gt; robot.position + paces[i] &gt;= raceLength);
        if (this.over) {
            return;
        }

        this.robots.forEach((robot, i) =&gt; {
            robot.advance(paces[i]);
            const middleDistance = Math.abs(robot.position - this.middle);
            if (middleDistance &lt; this.minMiddleDistance) {
                this.minMiddleDistance = middleDistance;
                this.bestRobot = robot;
            }
        })
    }
}

function rnd100() {
    return (100 * Math.random()) | 0; // only integer steps
}

// The specification does not say how each robot's pace is determined.
// The lambda functions in the following code can easily be replaced
// with rnd100 or any other number generator.
const robots = [
    new Robot('red', () =&gt; 90),
    new Robot('green', () =&gt; 7),
    new Robot('blue', () =&gt; 45)
];

const race = new Race(1000, robots);
while (!race.over) {
    race.step();
}
console.log('The winner is ' + race.bestRobot.color + ' with a distance of ' + race.minMiddleDistance + '.');

// Blue wins.
// The red robot crosses the finishing line after ceil(1000/90) == 12 steps.
// After 6 steps, the red robot was closest to the 500 mark, at 540.
// After 11 steps, the blue robot was at 11*45 == 495.
// The green robot is too slow to be a competitor.


I made the Robot class pretty small because the robot should not be involved in calculating the outcome of the race. Who knows, maybe one of them would try to cheat?

All the calculations happen in the Race class, which coordinates the robots.