sio2project / oioioi

GNU General Public License v3.0
161 stars 72 forks source link

Simple cheating detection #222

Open LightFelicis opened 1 year ago

LightFelicis commented 1 year ago

MOSS is integrated into Szkopuł but requires a lot of preparations from teacher side to use it. Tbh I think the moss feature is a bit of an overkill.

Feature request:

Within a contest, if student submits a solution identical (sha256 of files) to already submitted solution by different student, notify a teacher and display the score in the ranking with little (!) sign in the corner. Similar to disqualifications, but on the problem level. Teacher should be able to manually dismiss the warning or disable the feature for certain problems.

Stretch goal:

To support identical solutions but different variable names, we may develop a microservice that given cpp code, unifies variables and removes comments.

A-dead-pixel commented 1 year ago

I think that if someone bothers to change variable names, they will probably change at least one other thing that this wouldn't cover, for example the order of variable declarations. Additionally, after the first few occurrences (in a given environment) of people being caught with this, they would probably learn to circumvent this system.

As for the "(!)" in the ranking, I'd say it's neither desirable nor needed, as I can't see any point in doing this, other than shaming the cheaters.

LightFelicis commented 1 year ago

From my experience the cheaters dont bother on changing the order, they just ctrl+f and replace the variables :) changing the order may make the code not work and since it's not theirs they don't change it.

The (!) sign would be only visible for teachers, it's equivalent to disqualification ui, but per problem. Given a class of 30 students and 10 problems, I cannot think of better place to display it than in ranking grid.

LightFelicis commented 1 year ago

As of "they will learn about the system", MOSS detection can also be ommited, but I personally think it's not accessible for average teacher because of its UI.

This use case is not for OI, but for an average school. Looking through submissions manually is tedious.

A-dead-pixel commented 1 year ago

I see your point, the ranking does seem like the best place for the signs, provided normal users can't see them. Regarding the variable names, well, only time can tell whether the users will adapt, but the code could potentially be reused for https://github.com/sio2project/oioioi/issues/137. As for it being an alternative to moss, I agree with you, but I think that three plagiarism-detection-related modules would be too many, so exportszu should probably be removed (or moved to oioioi-contrib?), unless someone actually uses it.