Create horse racing betting game

Hello, i am totally new and looking for help for a project i have.

 

Basically i would like to have 5 robots going from a point A to a point B, starting at the same time but, according to a random speed, finishing in a different order every time, to simulate a race between each robots and determine a winner.

Here is a great example of what i want to accomplish :

https://youtu.be/I7PTYe1s7rg?t=109
but this one is not random, it's always the same output after a few minutes because of how it's made (i have one of these and opened the box to see how it's made).
What i think of would be to use vibrator robots like Fizzbit ones : https://www.kitronik.co.uk/5201-fizzbit-module-create-your-own-vibrating-robot.html
But i need to be able to turn them on off and have a random strenght in the vibration to make the winner random (and if possible to make the speed change every 1-2 sec to see competition between the 5 robots), + a lot more battery life than 20sec (like an hour or so would be great)..
Is this possible ? do you guys have any ideas ?
Thanks a lot for your help

Random

There are functions for random, not that hard.

I wrote one in html and javascript years and years ago that seemed pretty realistic, at least my client and myself though so. Not sure if I can find the code now. Such basic functions have near equivalents in every programming language.

http://www.cplusplus.com/reference/cstdlib/rand/

Ok thanks for the random but

Ok thanks for the random but my main problem is to find what componnents should i use :s

Pager Motors

Most of these little bots run on pager vibrators. Look for them at you local Ebay.