In the film "Westworld" (1973) starring Yul Brynner, it's shown that the firearms in Westworld will not fire on humans because they contain a heat sensor, allowing the gun to fire if pointed at a cold object (an android) but not if pointed at a warm one (a human being). But in the other two "worlds", Romanworld and Mediaevalworld, where people are fighting with swords, how could they stage a realistic fight while ensuring that any human guest would not be harmed?
In the fight sequence between the "king" and the Black Knight robot, just before the Knight malfunctions we get a pretty good overview of the fight techniques used to make the guests feel that they're getting a good show, without actually being in any way dangerous:
The knight will only attack when the opponent has both a shield and a sword.
The knight repeatedly hits his opponent's shield, despite there being obvious openings.
The knight repeatedly hits his opponent's sword, despite there being obvious openings.
The knight repeatedly hits scenery items, despite there being obvious openings.
The knight repeatedly misses his target entirely, despite there being obvious openings.
Since the robots have reflexes that are much better than humans, it can be expected that even if a human puts itself into harm's way during a fight, the robot would have the ability to trip, stumble or swerve their blade in such a way that makes a miss look organic.