I don't have the toy to play with, but it looks like if you 'deal' the balls up from the center to the sides according to their color, you'll get it almost all sorted out quite quickly.
In other words, choose the right-hand side to be red and the left to be white (or the other way around if you prefer). From the starting position shown, you'll push:
- the first two (red) balls up on the right
- now you've got white, red, white, red in the middle section reading from the top
- so, the next four balls will be pushed up to the left, right, left, right.
- just keep going on like this...
I can confirm that this works. I made a simple google sheet with the controls. You can find it here. I don't know much about these scripts, so you might need to do an authorization to make it work.
Google Sheet Emulating the Game
This goes from the starting position:
To the ending position as follows: