Troll - Discussion

From doing these activities students will

Warm-up activity - 25 min

You will have 20 minutes for this activity

Think - 5 min

Read the following vignette Do a light reading and take some notes on key ideas. If you get stuck, please move on. You will have time in a pair to compare solutions and put things together.
An interpretter for troll can be found here.

Eratta: the semantics of binding variables without mutation makes this first few questions misleading.

You seek the crown of parsing, a magical item that lets you understand the syntax of any language by lifting it into a universal abstract language. The crown is located in the cave complex before you, but it is guarded by various magical creatures. You can search the cave and fight off magical creatures until you reach your physical limit of taking 20 damage points. Good luck!

Write a troll expression that keeps track of your physical limit:

You enter the cave armed with just your crystal staff. Your staff can inflict between 2 and 10 damage points randomly when used physically. You staff increases in damage by +5 points when infused magically, but you can only infuse it with magic 3 times.

Write a troll expression that keeps track of how many times you can infuse magic:

Write a troll expression for your physical damage and your magically infused damage:

Just past the entrance, there is a goblin that can take 4 damage points before she is defeated. She will not counterattack, but she will block your path.

Write a troll expression for defeating the goblin:

Past the goblin there is a 3 way fork in the path. A fickle spirit decides to help you with lucky medallions with between 1 and 3 luck each. You can ask for as many as you want until you get one that has a luck of 2. Write a troll expression to represent the medallions: medallions := (accumulate x := 1d3 until x == 2)

Write a troll expression to pick a medallion to use at random:

Choose 1 branch of the following 3 to continue on <

On the left branch there is a series of traps that require 10 acrobatics points to traverse safely. Otherwise, you will take 1 damage point and get transported back to the beginning of this series of traps. You are nimble with a +8 to acrobatics. Roll a d20 and add your +8 to see if you make it across. The spirit's luck can be added to your acrobatics points to boost your chances if you fail by picking a medallion at random.

Write a troll expression that represents traversing the traps and returns your remaining health:

On the middle branch is a bridge troll that can suffer 20 damage points before being defeated. He will attack you after you attack him twice, even if his health falls to zero during a round, inflicting up to 4 damage points on you each time. The spirit’s luck can be added to your attack roll to do more damage by adding the sum of the spirit’s medallions exactly once during the battle.

Write a troll expression that represents battling the bridge troll until you succeed or are defeated and returns your remaining health and the troll’s remaining health:

On the right branch, a room contains 3 fae. They challenge you to a 3 against 1 spar. Each fae will attack either 1 or 2 times per round causing between 1 and 4 damage points per attack. You launch a counter attack for each one. Each of your attacks that are greater than theirs will defeat one of them; each attack of theirs that is greater than yours will do full damage to you.

Write a troll expression that represents battling the fae until you succeed or are defeated returning your remaining health and the remaining number of fae:

If you are still alive, congratulations, you've got the crown.

Triple - 10 min

With 2 people near to you, write all of your names on a piece of paper. Compose expressions for the vignette. There may be more than one solution, the goal is to see if you both agree if your expressions can reasonably represent the narrative.

Share - 10 min

Each pair will share out solutions, questions, comments, etc. Matthew will live code some of the expressions in the online Troll interpretter.

Prep for paper discussion

Please write what roles each group member wants to do on the piece of paper and turn it in.

Groups and Roles

By performing the duty of a role you will earn one participation point (1% of final grade).

Scribes

Scribes will take notes during the conversation while participating. Then, they will contribute to a formal write up with eachother on the class wiki . For example, after this activity, the scribes will contribute to a "Troll" Wiki page in the Reading wiki with a consensus of the answers to today's questions.

Managers

Managers will pace the group using the time estimates accompanied by each class agenda, making sure the group touches upon each question or activity. Then, they will contribute to github issues to assign to the instructors or other classmates asking for information / work the class needs before the next class meeting in order to be successful. For example, If during discussion, someone asked a question about how the implementation for Troll works, and no one knows the answer then a manager would make a github issue detailing the question on the Reading repository and assign it to an instructor. Managers also may prune/clean-up the issue tracker to get rid of old tasks, re-assign them, etc.

Ambassadors

Ambassadors represent their group in the large-group discussion at the end of the activity. For example, after each group finishes this activity, the ambassadors be the first to talk when asking for answers to each discussion question.. Then, they will meet with the instructors before the end of the class to go over the "meta" of the class, and discuss how workload, group pacing, and other housekeeping items went.

Small group discussion - 25 min

All groups answer the following discussion questions:

Large group discussion - 15min

Ambassadors will take turns discussing their group's answers to the questions before opening the floor to the rest of the class

Cool-down activity - 10 min

All scribes will get together to start their wiki write up to be finished at latest a week from today.

All managers will get together and make tickets for the course. This can include the tickets from their group discussions as mentioned above, a ticket to follow up on the scribe write up, and any other issues they think will be helpful.

All ambassadors will get together with Matthew and Kathleen and discuss how they think the day went, how they think the pacing went, what they are looking forward to, any worries they might have about the class, etc.

Class Dismissed

Please do Wednesday's coding assignment before next class.