Package edu.wisc.game.rest
Class MlcUploadService
java.lang.Object
edu.wisc.game.rest.MlcUploadService
@Path("/MlcUploadService") public class MlcUploadService extends Object
Uploading and processing results files by MLC
participants. Discussed in email in June-July 2022. Extended in
Jan 2023 to support compact format.
This service includes calls for uploading data, and for various comparison pages.
-
Constructor Summary
Constructors Constructor Description MlcUploadService()
-
Method Summary
Modifier and Type Method Description String
compare(String nickname, String rule)
Prints the summary of a specified player's performance on a particular rule set, in comparison with other players.String
compareRules(String nickname, String rule)
The REST call for comparing rule set with respect to an algostatic String
giveKey(String nickname)
Used by the MlcLoginServlet etcString
summary(String nickname, String rule)
Prints the summary of a specified player's performance on a particular rule setString
uploadFile(String nickname, String key, org.glassfish.jersey.media.multipart.FormDataBodyPart parts)
Allows an MLC participant to upload a file with the results of his ML algorithm's performance.
-
Constructor Details
-
MlcUploadService
public MlcUploadService()
-
-
Method Details
-
giveKey
Used by the MlcLoginServlet etc -
uploadFile
@Path("/uploadFile") @POST @Consumes("multipart/form-data") @Produces("text/html") public String uploadFile(String nickname, String key, org.glassfish.jersey.media.multipart.FormDataBodyPart parts)Allows an MLC participant to upload a file with the results of his ML algorithm's performance.nickname,rule_name,trial_id,board_id,number_of_pieces,number_of_moves,move_acc,if_clear RandomTest,alternateShape2Bucket_color2Bucket,0,0,9,29,0.3103448275862069,1 RandomTest,alternateShape2Bucket_color2Bucket,0,1,9,20,0.45,1 ...
-
summary
@GET @Path("/summary") @Produces("text/html") public String summary(@QueryParam("nickname") String nickname, @QueryParam("rule") String rule)Prints the summary of a specified player's performance on a particular rule set -
compare
@GET @Path("/compare") @Produces("text/html") public String compare(@QueryParam("nickname") String nickname, @QueryParam("rule") String rule)Prints the summary of a specified player's performance on a particular rule set, in comparison with other players.- Parameters:
nickname
- The nickname of the player being compared to others. It does not actually affect the content of the table (as it will show all players who have learned the rule set), but we will display the table row for this player in bold.Sample URL:
http://sapir.psych.wisc.edu:7150/w2020/game-data/MlcUploadService/compare?nickname=RandomTest&rule=position_A
-
compareRules
@GET @Path("/compareRules") @Produces("text/html") public String compareRules(@QueryParam("nickname") String nickname, @QueryParam("rule") String rule)The REST call for comparing rule set with respect to an algo
-