-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This project introduces a “serious game” for the INTERLINK collaboration environment. The goal of this is to strengthen the collaboration between the team members, measure their engagement, and represent their level of expertise across different dimensions (e.g., management, development, communication, etc.). A project succeeds when the management, the development/deployment and the exploitation dimensions are adequately covered.
Based on this consideration, the game we have in mind tracks the team members' relevant actions and assigns them the three different kinds of points: management, deployment and exploitation. Specific levels and leaderboards in the dimensions of the different points measure the contribution of a single player to the project. This could be important when the project owner will distribute the shares and, in general, it is a way to recognise each single-player contribution.
Finally, the idea is to introduce challenges in order to introduce prioritization in the project task execution. As an example, if the project owner requires a task completed in a short time he/she can insert a challenge that doubles the deployment points to the player who will complete it in time. The game is based on relevant action tracking: open a forum discussion, organize a meeting, manage/contribute to a deliverable, etc. This could be a tricky point since it is not so easy to understand when a specific action or a task is completed. In order to handle this in this first release, the points assignment is based on a task/subtask complition.
The gamification is introduced in Interlink via Interlink Gamification Engine.
The solution is based on FBK Gamification Engine which is extended in order to fulfil the Interlink requirements and constraints. In Interlink a Game is based on the Interlink Process Structure. The game is configured with a standard distribution point table with associates each task with the set of points (management, development, exploitation). The project owner can at any time change the game configuration at the level of the process/service tree.
In particular, he/her can:
- modify the number of points for a specific task
- modify the thresholds points required to gain the different levels
- add challenges
The project is based on:
- JDK 11
- MongoDB
- Spring Boot
You can set the following configuration parameter in application.yml
In order to link a Interlink Process to a Game you have to create a game model and a template file which maps the Interlink Process Task to the points. you have to copy and put both those files in <your_import_folder>. In the following file a configuration example.
As far as the game model the game must be defined using FBK Gamification Engine Language (https://github.com/smartcommunitylab/smartcampus.gamification/wiki/Game-model). The following are the specification of the game default game which assign points to the player whene a task is completed.
{
"interlink": {
"game": {
"id": null,
"name": "game_one",
"owner": "interlink",
"domain": "",
"actions": [
"update_player_points"
],
"tasks": [],
"rules": null,
"concepts": [
{
"obj": {
"id": "1",
"name": "management",
"score": 0.0,
"periods": {
"weekly": {
"start": 1601071200000,
"end": null,
"period": 604800000,
"identifier": "weekly",
"capacity": 0,
"instances": {}
},
"daily": {
"start": 1601071200000,
"end": null,
"period": 86400000,
"identifier": "daily",
"capacity": 7,
"instances": {}
}
}
},
"type": "eu.trentorise.game.model.PointConcept"
},
{
"obj": {
"id": "1",
"name": "development",
"score": 0.0,
"periods": {
"weekly": {
"start": 1601071200000,
"end": null,
"period": 604800000,
"identifier": "weekly",
"capacity": 0,
"instances": {}
},
"daily": {
"start": 1601071200000,
"end": null,
"period": 86400000,
"identifier": "daily",
"capacity": 7,
"instances": {}
}
}
},
"type": "eu.trentorise.game.model.PointConcept"
},
{
"obj": {
"id": "1",
"name": "exploitation",
"score": 0.0,
"periods": {
"weekly": {
"start": 1601071200000,
"end": null,
"period": 604800000,
"identifier": "weekly",
"capacity": 0,
"instances": {}
},
"daily": {
"start": 1601071200000,
"end": null,
"period": 86400000,
"identifier": "daily",
"capacity": 7,
"instances": {}
}
}
},
"type": "eu.trentorise.game.model.PointConcept"
}
],
"levels": [],
"expiration": 0,
"terminated": false,
"settings": {
"statisticsConfig": {
"development": "weekly",
"management": "weekly",
"exploitation": "weekly"
},
"challengeSettings": {
"disclosure": {
"startDate": 1591178400000,
"frequency": {
"value": 7,
"unit": "DAY"
}
}
}
}
},
"rules": [
{
"gameId": null,
"name": "update_development_points",
"id": null,
"content": "package eu.trentorise.game.model\n\nimport eu.trentorise.game.core.Utility;\n\n//declare any global variables here\nglobal Utility utils;\n\nrule \"update_development_points\"\nwhen\n InputData( $development : data[\"development\"])\n $pc : PointConcept(name == \"development\")\nthen\n utils.log(\"apply \\'update development points\\'\");\n Double development = $development != null ? (Double) $development : 0;\n\n \n $pc.setScore($pc.getScore() + development);\n update($pc);\nend",
"inputStream": {}
},
{
"gameId": null,
"name": "update_management_points",
"id": null,
"content": "package eu.trentorise.game.model\n\nimport eu.trentorise.game.core.Utility;\n\n//declare any global variables here\nglobal Utility utils;\n\nrule \"update_management_points\"\nwhen\n InputData( $management : data[\"management\"])\n $pc : PointConcept(name == \"management\")\nthen\n utils.log(\"apply \\'update management points\\'\");\n Double management = $management != null ? (Double) $management : 0;\n\n \n $pc.setScore($pc.getScore() + management);\n update($pc);\nend",
"inputStream": {}
},
{
"gameId": null,
"name": "update_exploitation_points",
"id": null,
"content": "package eu.trentorise.game.model\n\nimport eu.trentorise.game.core.Utility;\n\n//declare any global variables here\nglobal Utility utils;\n\nrule \"update_exploitation_points\"\nwhen\n InputData( $exploitation : data[\"exploitation\"])\n $pc : PointConcept(name == \"exploitation\")\nthen\n utils.log(\"apply \\'update exploitation points\\'\");\n Double exploitation = $exploitation != null ? (Double) $exploitation : 0;\n\n \n $pc.setScore($pc.getScore() + exploitation);\n update($pc);\nend",
"inputStream": {}
}
],
"challengeModels": []
}
}As far as the template you can define different templete of a process. In the following example you can see the template specification language. The template specification language is straitforwad, you have to specift the name of the tempplate (the game’s name), the list of the tags the game apply (here you can a list of process name which the game applies), a file name which contains the game model and the structure of the interlink process.
{
"interlink": {
"template": {
"_id": "null",
"name": "game_one",
"filename": "game_1.json",
"tagList": [
"process1",
"process3"
],
"taskList": [
{
"id": "one",
"management": 100,
"development": 30,
"exploitation": 100,
"completed": false,
"playerList": [],
"subtaskList": []
},
{
"id": "two",
"management": 40,
"development": 100,
"exploitation": 40,
"completed": false,
"playerList": [],
"subtaskList": []
},
{
"id": "three",
"management": 40,
"development": 100,
"exploitation": 40,
"completed": false,
"playerList": [],
"subtaskList": []
}
]
}
}
}You have to copy and put both those files in <your_import_folder>
To be implemented
In order to start Interlink Gamification Engine, it is required to run the following command from the project root(profile specific).
- Clone the project with
git clone <gitpath> - Compile the project with
./mvnw clean install - Start your MongoDB
- Lanch the server with java -DstatsLoggerLevel=INFO -Dimport.dir=<your_import_folder> -jar target/gamification-.jar --spring.profiles.active=no-sec
Here you can reach the Interlink Gamification swagger
The first think you have to do is to update the template list in the gamification engine. You can do so via the following call:
curl -X GET "http://localhost:8080/interlink/gametemplate/refresh"
Than you shoud get and process tyte and see which games can be used with it. You can do so via the following call:
curl -X GET "http://localhost:8080/interlink/gametemplate/process1/list"
One you have the list of the game you have to instantiate one of it. You can do so via the following call:
curl -X POST "http://localhost:8080/interlink/game/processId/my_process_id" -d
{
"interlink": {
"template": {
"_id": "null",
"name": "game_one",
"filename": "game_1.json",
"tagList": [
"process1",
"process3"
],
"taskList": [
{
"id": "one",
"management": 100,
"development": 30,
"exploitation": 100,
"completed": false,
"playerList": [],
"subtaskList": []
},
{
"id": "two",
"management": 40,
"development": 100,
"exploitation": 40,
"completed": false,
"playerList": [],
"subtaskList": []
},
{
"id": "three",
"management": 40,
"development": 100,
"exploitation": 40,
"completed": false,
"playerList": [],
"subtaskList": []
}
]
}
}
}At any moment you can get the game definition and status via the following call:
curl -X GET "http://localhost:8080/interlink/game/6284bcea3b18c875d7d808a7"
As we said above there is a mapping from the process task and the game task defined in the game structure. When you want to assign a user (player in the game) to a specific task you will need to claim this task for the user. You can do so via the following call:
"http://localhost:8080/interlink/game/6284bcea3b18c875d7d808a7/task/one/claim" -d "
{
"id":"player_one",
"name":"player_one"
}In order to distribute the points to the user bind to a specific task you have to complete the task. Before doing so you have to update the task in order to assign the points to the users/players bounded with the task. This is an operation which requires to read the current task status and than to update the task status witch the correct point distribution. Eventualy, you can complete the task and assigne the points to the users/players. You can do so via the following calls:
curl -X GET "http://localhost:8080/interlink/game/6284bcea3b18c875d7d808a7/task/one"
It will returns something like:
{
"id": "one",
"management": 100,
"development": 30,
"exploitation": 100,
"completed": false,
"subtaskList": [],
"players": [
{
"id": null,
"name": "player_one",
"management": 0,
"development": 0,
"exploitation": 0
},
{
"id": null,
"name": "player_two",
"management": 0,
"development": 0,
"exploitation": 0
}
]
}Modify the points associated to the users/players and than call:
"http://localhost:8080/interlink/game/6284bcea3b18c875d7d808a7/task" -d
{
"id": "one",
"management": 100,
"development": 30,
"exploitation": 100,
"completed": false,
"subtaskList": [],
"players": [
{
"id": null,
"name": "player_one",
"management": 100,
"development": 0,
"exploitation": 0
},
{
"id": null,
"name": "player_two",
"management": 0,
"development": 30,
"exploitation": 100
}
]
}In order to assign the points to the users/players you have to complete the task. You can do so via the following call:
curl -X PUT "http://localhost:8080/interlink/game/6284bcea3b18c875d7d808a7"
In any moment you can get the users/players which actively partecipated to the process and game. you can do so via the following call:
curl -X GET "http://localhost:8080/interlink/game/6284bcea3b18c875d7d808a7/player"
And eventually you can get the status of a specific user/player. You can do so via the following call:
curl -X GET "http://localhost:8080/interlink/game/6284bcea3b18c875d7d808a7/player/player_one"