The efficiency of a reversible heat engine (Carnot engine) is given by the formula:
\[
\eta = 1 - \frac{T_C}{T_H}
\]
where \( T_H \) is the temperature of the heat source and \( T_C \) is the temperature of the heat sink.
Here, \( T_H = 500 \, K \) and \( T_C = 400 \, K \). Substituting the values into the formula:
\[
\eta = 1 - \frac{400}{500} = 1 - 0.8 = 0.2
\]
Thus, the efficiency of the heat engine is \( 20% \).