Challenge Task 2018

This semester's Challenge Task (CT) is to implement a Decentralized Application (DApp) running in the Ethereum blockchain. The application must implement the Tic-Tac-Toe1 game with a betting system, all embedded in a Smart Contract.

The Tic-Tac-Toe game is straightforward. Assuming that player X starts. He/she starts by drawing an X in a single cell of a 3x3 board. Afterwards, the player O draws an O in any other empty cell of the board. This process is repeated until one of the players completes a row, line, or diagonal with the respective symbol (X or O) or there are no more empty cells left, characterizing a draw.

1The Tic-Tac-Toe game is further explained at https://en.wikipedia.org/wiki/Tic-tac-toe or https://www.google.ch/search?q=tic+tac+toe

CT Formal Description (PDF, 155 KB)

Requirements

Each CT group is free to decide on the design of this game's specification, for example, how to store a game board, how to check the winner, how the betting system can work, and which visualization of the game will be implemented. However, for each CT group the following key requirements are to be met:

  1. The fully functional Tic-Tac-Toe game (text or graphics based) must run entirely within Smart Contracts (SC).
  2. The SC must be able to store more than one game, i.e., more than one game can be played at same the time.
  3. The SC must automatically pay the bet to the winner or divide the bet in the case of a draw.
  4. Report documenting the Smart Contract and its operation.

Further suggestions include:

  • The solution may use existing libraries and code, but those must be allowed to be published under APL or another comparable open software license.
  • The final report shall document the application and its operation, mainly with all the details needed to be shown at the presentation and demo. The report should contain around 4 pages.

Assumptions

The following facts may be assumed:

  • The Smart Contract can be deployed in a private testnet or in the Ropsten testnet.

  • You can use just one node (Geth client) in the blockchain with multiple addresses.
  • An address cannot play against itself.
  • Note: Further assumptions can be made according to each group's approach.

Libraries and Tools

The items below represent supporting libraries, tools, or references that are recommended to be taken into consideration.

Organization

  • The groups shall be balanced. Every group shall have one development expert. During the challenge task, the group shall meet every week during exercise hours to work on the task and discuss the next steps.
  • The groups shall utilize their homework times to work on the CT, besides the exercise time slots assigned on Thursday.
  • The groups shall determine and set-up an internal project plan with the overall milestones timings provided here.
  • Distribute the workload so that each group member gets a fair load of work (P2P load balancing, no free riding!) and make sure activities can run in parallel (non-blocking).
  • You can use your own laptop and/or the computers in room BIN 1.D.12.
  • Do not miss the opportunity of discussing details with your group supervisor, he might give you good hints.

Groups and Support

During the challenge task each group will be able to ask questions and get support from their supervisors:

# Group Name Participants Supervisor
1 Rio

Fabian Leisibach, Lukas Eisenring, Stefan Würsten

ES/BR
2 Tokyo

Timo Hegnauer, Lenz Baumann, Cyrill Halter

ES/BR
3 Moscow

Olajoke  Oladipo, Yannick Tanner, Patrick Widmer, Cyrus Einsele

ES/BR
4 Nairobi Andreas Schaufelbühl, Lucas Pelloni, Severin Wullschleger ES/BR
5 Palawan

Ivan Taraca, Alexander Hofmann, Nico Strebel

ES/BR

Presentation and Evaluation

Challenge task presentations and demonstrations will take place on 17.05. and 24.05. from 14:00 to 15:45. On these dates, the groups will present and demonstrate their results, which will be evaluated by a jury. Presentations and demos on dates will take place in room BIN 2.A.10.

  • Each group will have ~20 minutes for presenting their design and to demonstrate the working application (roughly 10 min presenting and 10 min demo). The presentation shall include slides. For the demonstration, you must run at least three games showing the different outcomes (Winner X, Winner O, Draw) and the balance of the accounts being updated after the game finishes. Most of the demonstration, though, will be done using the machine connected to the projector(s), so more people can see what is going on. Ideally, it is the same machine that will run the slide presentation.
  • Make sure that everything will work for your demo! Test everything beforehand with given conditions, especially the blockchain/mining. If a group fails to present within its time window, it will be disqualified.
  • Remember that the audience will not only be interested in seeing whether or not your application works, but more specifically how the designed mechanisms for winner check, game board storage, and betting system work behind the scenes.
  • After the demonstration, each group will be evaluated by the jury. The jury is composed of lecturers and assistants, and each member will cast one vote per group. The following criteria will be taken into consideration: software design and implementation (fulfilment of requirements, overall design, and usability), team work, presentation and demonstration of the solution. The results of the votes will be collected and disclosed after the last presentation. The winning group will receive a  prize and the "BCOLN Challenge Champion 2018" award.
  • Each group shall hand-in the report and source code of the Smart Contract until 16.05. - 23:59

CT Grading Impact

The CT grade will impact in the final written exam grade in the following manner:

  • All the four CT requirements met (0 missing requirements):
    • No overall grade reduction
  • Three CT requirements met (1 missing requirements):
    • 0.5 point grade reduction in the final written exam
  • Two requirements met (2 missing requirements):
    • 1.0 point grade reduction in the final written exam
  • Only one requirement met (3 missing requirements):
    • 1.5 point grade reduction in the final written exam
  • No requirement met (4 missing requirements):
    • 2.0 point grade reduction in the final written exam
  • If grade equals or below 4.0:
    • No grade reduction
Grading Table Example

Result

Fulfilment of the Requirements

Requirement / Group

1 - Rio

2 - Tokyo

3 - Moscow

4 - Nairobi

5 - Palawan

RQ 1

RQ 2

RQ 3

RQ 4

= Fulfilled = Not Fulfilled

🏆 Winner CSG-award: Group 4 - Nairobi: Andreas Schaufelbühl, Lucas Pelloni, Severin Wullschleger

Reports and Source Code

Please find below the report and source code of each group for download.

In addition, the report and source code can be found in this Link

Source code is licensed under open source license. In case of questions, please contact the respective supervisor.

Group 1 - Rio

Group 2 - Tokyo

Group 3 - Moscow

Group 4 - Nairobi

Group 5 - Palawan