I don't know if I've missed something obvious, but I've tried different ways to represent the positions and counts of the bottles, even binary, and none of them have worked.
Thanks for playing the game to the end, I thought the library puzzle was going to be too hard, but that doesn't seem to be the case. And the bright end sends you to the menu, the dark one restart the game.