Error should be squared

The notebook states:

The error is

๐‘…+๐›พmax ๐‘„ฬ‚(๐‘ โ€ฒ,๐‘Žโ€ฒ;๐‘คโˆ’)โˆ’๐‘„(๐‘ ,๐‘Ž;๐‘ค)

Which I couldnโ€™t make sense of. Then later in the notebook the algorithm image has the above (with Q-hat) squared which makes sense since the sign of the difference shouldnโ€™t matter. And the programming instructions refer to mean squared error.

On further thought I find the use of the word โ€œerrorโ€ confusing. Gradient descent reduces the โ€œerrorโ€ but here it is reducing the square of the difference between the target and the predictions. So isnโ€™t it clearer to refer to the error as (target-prediction)**2 instead of just target-prediction?