It's pretty easy to determine if a player "is* an engine, and all the moves are computer generated. Where it gets difficult is more subtle cheating.
So you can set some engines not to pick perfect moves but to pick moves consistent with a particular rating or style...
It could be modulated based on opponent, but does not have to be.
That's the next generation of chess engines - AlphaZero trounced Stockfish in a match of 100 games with 28 wins and 72 draws and not a single loss. And if you decrease the power a little bit (take an earlier generation), it makes significantly more human-like moves than Stockfish.