Closed rdcruzCFL closed 4 years ago
All the notes I left on here seem to have disappeared! Which is really annoying because they were quite long!
I have completely rewritten worksheet 1 and (hopefully) made it clearer and more useful. Please let me know any comments before I proceed to 2 and 3. I cannot remember what else I said.
It is in Code For Life Full Time/Admin/Research. There is a PDF and a Google docs version (probably the easiest to comment on). I created it in Word as it is much easier but it seems to convert okay.
Worksheet 1:
Worksheet 2:
hi @rdcruzCFL I copied your notes the other day and made a doc called challenges. https://docs.google.com/document/d/1qviENrKTMuoMberxBJZH-KXyl3sgjF9zAiT-M3qP5R8/edit Comments are on it.
Worksheet 2: Avoid obstacles [selection]); pick up any pickup 1: Turn off auto pickups 2: Tell me what the API for querying if there is pick-up here/xy and then picking it up 3: How will we know they have picked something up?
1: We're working on turning off auto pickup now, we've coded the functionality for it and tested it. We just need to merge it in and deploy it now.
2: The API for querying if there is a pickup and picking it up would look something like this:
current_cell = world_state.get_cell(avatar_state.location)
if current_cell.has_artefact():
action = PickupAction()
else:
action = MoveAction(direction.NORTH)
return action
3: The pickup will disappear. We've also added an attribute to the avatar_state
object called number_of_artefacts
. The students can see how many artefacts they've picked up by having print(avatar_state.number_of_artefacts)
in their code.
I've just had a look at the new and improved Worksheet 1. I think it is indeed a lot clearer and the code hints are much better. I think it definitely has a less steep learning curve compared to the previous one and is easier to follow. Thank you :blush:
Regarding the import random
issue, I've left a comment on the document. I'm basically saying that we've had to remove the imports for security purposes as pentesters managed to use the imports maliciously. We could maybe try and explore other options but I can't think of many at the moment, maybe for now it might be best to keep the worksheet without the import as it's been for a while? We could have a more in-depth discussion about this (and with the whole team) after the testing session
I have added:
Summary of queries raised on Slack today:
cell
have any other accessible attributes? Currently, there only seems to be locationworld_state.get_cell(next_cell)
contain if there was an avatar there?def next_turn(world_state, avatar_state):
new_dir = direction.NORTH
# Your code goes here
action = MoveAction(new_dir)
return action
Cell
object. That cell object will have an attribute avatar
which would contain the state of the avatar on that cell
As per Kurono teaching pathway document: Recreate worksheets 1 and 2: both pupil and teacher versions