I don't personally believe that math explains " randomized robotic behavior" and is the end all explanation for things. Much like religion. And if something is random (eg: A robot expressing joy/sadness depending on how the player treats them/responds) then who is to say "random" isn't "life"? Since emotions are. I imagine Codsworth/Synth are operating on a "randomized" behavior pattern that is changed upon circumstance between options X and Y, with the list getting narrowed down one way or the other depending. Even if a robot follows instructions when told, that would still prove random behavior. And I can't imagine it being anything other then that because, even with high technology, there's not not enough room to code for every single possible action/reaction.
I roll a dice. It lands on a random number. The dice didn't randomize, I did because I tossed it. That's pure math (and perhaps a little "how to throw the dice" ability). But a machine? Even "programmed selection of certain random options" is still a choice in a ways. And those choices can and will change by environment and how the robot in question is treated. Just like a human. Wherever the robot in question can choose not too follow a command is of course another matter. And wherever they were programmed to be as such is again another matter. Was it programmed into them? Maybe. Does that change the answer one way or another? I don't personally think it should. And even parents make a baby. And it's probably just as well, otherwise I'd likely be saying "They were made. they live."
And do we even know HOW the robots are programmed specifically? We might just lack sufficient information to know one way or the other. But I see the possibility being there at least.
Since we're discussing robotic actions that obviously means possible spoilers.