# 2020 Software RDC Manual
This document is intended for software candidates participating in the HKUST Robotics Team 2020 RDC.
<!--
## Objective
* The objective of the RDC is to assess:
* How well you **cooperate** with each other.
* Your **knowledge**/skillset and **attitude** towards learning.
* How well you take **initiative** and **self-learn**.
## Game Rules
* A game will be simulated on the Emulator and should take at most 3 minutes.
* Each team controls one robot. This robot must perform the tasks stated.
* Teams will have access to have various components (motors, sensors, and components). These are restricted to a set agreed with the Mech and HW divisions.
* Obstacles will be randomly generated in the field.
## Game Tasks
### Field Tasks: The stuff common to Mech, HW, and SW
* Move the robot
* Avoid obstacles
* Grab balls from the appropriate basket
* Tennis ball
* Ping-pong ball
* Place 3 ping-pong balls into each placing-basket
* Grab placing-baskets
* Place placing-baskets on rack
* Shoot tennis balls to conversion post on the other side of the field.
### Software Tasks
* Code will be simulated through the Emulator.
* Code may be split into multiple files.
* The wheelbase is comprised of two forward wheels and an universal wheel at the back.
-->
## Submission
### Requirements
* Your robot should start from the **blue start zone**.
### What, When, Where
1. **Your team's code** (due Dec. 23rd, 11:59PM). This should be uploaded onto a private repo. Add [HKUST-Robotics-Team](https://github.com/HKUST-Robotics-Team) as a collaborator. We will only look at the code on the **master** branch.
* We expect your code to be readable. This means you choose good variable names, function names, and add comments to specific choices (e.g. algorithms).
* If you are unable to merge your code (i.e. the code is separated, disjoint), then create a `README.md` in your master branch and specify which branches/folders/files we should assess.
2. Screen-recorded **video(s) of your best performance** (due Dec. 23rd, 11:59PM). This should be uploaded to the same Github repo.
* Enable [Demo Mode](https://hackmd.io/@TrebledJ/S1Zh67hOv#Demo-Mode) in the Emulator (v1.3.0 feature).
* Appoint one person from your subgroup to screen-record the video. You may run the code as many times on your computer as you like.
* Try your best to merge your code such that all tasks are performed in one **continuous** run. If you managed to do a continuous run, upload only **one** video demonstrating it.
* Otherwise, if your run isn't continouous, then we call it **disjoint**. In this case, you may upload multiple videos, showcasing different tasks. Note that disjoint runs will automatically receive 0 marks for the **time** criteria (described below).
Seeding is disabled in Demo Mode, since it is only meant for debugging purposes.
## Disqualifications
A team is disqualified if:
* ...found colluding with another team. We encourage sharing ideas/concepts across teams, but collusion is a no-no.
* ...they fail to provide/submit their code on time.
* ...the code submitted performs malicious behaviour (e.g. modifies OS, connects to network, installs virus). Saving/reading Emulator-related files is OK.
## Final Presentation ~~(Doomsday)~~
* You should have received an email regarding meeting details.
* In the Zoom meeting, you may choose to either play your pre-recorded video(s) or do a live demo. Keep it timely.
## Evaluation
Subgroups will first be ranked in the following order:
1. Time to reach end-game condition (turns)
2. Time to reach end-game condition (seconds)
3. Score attained
4. Number of violations
The subgroup ranking first place receives 30 marks, second place receives 26 marks, third place receives 22 marks, and so on.
The following bonuses/consequences will then be applied on top.
### [5 marks] Teamwork
Bonus marks for exceptional teamwork. Based on mentor's evaluation.
### [-5 marks] Titanium Code
Marks will be deducted if a significant portion of code relies solely on hard-code or magic numbers (e.g. hard-coding which basket to go to).
<!-- The criteria below will be used to evaluate each subgroup. Marks will be capped at 30. -->
<!-- ### [15 marks] Score Gained
This criteria looks at the game points obtained, as described in the rule book. Teams can't score more than 15 marks here.
* $x$: game score.
* Calculated by: $$\min(15 \times \frac{x}{59}, 15)$$
59 refers to the score obtained by achieving the end game condition (as described in the rule book).
### [15 marks] Time Taken
This criteria looks at the time taken to complete tasks and will be considered only for teams that demonstrate they can **achieve one continuous run** and **complete all tasks**. A zero (0) is automatically given for this criteria otherwise or if the tasks couldn't be completed after 180 seconds (3 minutes).
* $s$: seconds taken.
* $t$: turns taken.
* $k$: best #turns. Determined after the deadline for submissions.
* Calculated by: $$15 \times \left( \frac{180 - s}{180} \times 0.5 + \frac{k - t}{k} \times 0.5 \right)$$ -->