Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Counting flowers #2249

Merged
merged 3 commits into from
Jan 5, 2025
Merged

Counting flowers #2249

merged 3 commits into from
Jan 5, 2025

Conversation

byorgey
Copy link
Member

@byorgey byorgey commented Dec 30, 2024

Another challenge scenario to showcase the use of print/read.

@byorgey byorgey force-pushed the scenario/count-flowers branch from 213514f to e06f586 Compare December 30, 2024 17:21
@kostmo
Copy link
Member

kostmo commented Dec 31, 2024

In order to provide useful playtesting feedback, I have not inspected the yaml file for the counting flowers scenario. I haven't solved it yet, but here's what I've tried so far:

  • Using the typewriter to print something (I get a print: what is a paper error)
  • meeting the True Love and give-ing them the typewriter
  • grab-ing a flower
  • grab-ing a fuse
  • unequiping each device in the inventory to see if I can make some other useful device, e.g. to facilitate the resonate command. I inspected each equipped device to see their recipes. The farthest I got on this front was to McGyver a hyperloop from the strange loop and ADT calculator.

My main idea would have been to print numbers sequentially, since the upper bound is <5000. Visually the density looked around 10%, so perhaps it would have gone only 500 iterations. But I am stuck at the paper error.

@byorgey byorgey force-pushed the scenario/count-flowers branch from e06f586 to 471326f Compare December 31, 2024 03:05
@byorgey
Copy link
Member Author

byorgey commented Dec 31, 2024

@kostmo Oh, sorry, this PR is not ready for review yet! It is unsolvable since there is still more stuff I need to add. I'll let you know when it's ready for you to give it a try.

@byorgey
Copy link
Member Author

byorgey commented Dec 31, 2024

My main idea would have been to print numbers sequentially, since the upper bound is <5000. Visually the density looked around 10%, so perhaps it would have gone only 500 iterations.

Oh, hmm, I will have to think how to rule out this unintended solution. 😄

@byorgey byorgey force-pushed the scenario/count-flowers branch 3 times, most recently from 025a594 to ae158dd Compare December 31, 2024 20:06
@byorgey
Copy link
Member Author

byorgey commented Dec 31, 2024

@kostmo OK, this should be ready for test playing! There's still one more thing I want to iron out but it's only cosmetic.

@byorgey byorgey force-pushed the scenario/count-flowers branch from ae158dd to b438bab Compare December 31, 2024 20:47
@byorgey byorgey added the CHANGELOG Once merged, this PR should be highlighted in the changelog for the next release. label Dec 31, 2024
@byorgey byorgey force-pushed the scenario/count-flowers branch from b438bab to 4ba94fc Compare January 1, 2025 14:00
@byorgey byorgey marked this pull request as ready for review January 1, 2025 14:44
@byorgey byorgey requested review from xsebek and kostmo and removed request for xsebek January 1, 2025 14:48
@byorgey byorgey force-pushed the scenario/count-flowers branch from 4ba94fc to 9ad1c26 Compare January 3, 2025 21:31
@byorgey byorgey force-pushed the scenario/count-flowers branch from 9ad1c26 to 8ec7048 Compare January 3, 2025 22:13
@byorgey
Copy link
Member Author

byorgey commented Jan 3, 2025

This is now all rebased and fixed up on top of the changes in #2245, should be ready for review.

Copy link
Member

@kostmo kostmo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's my solution. I enjoyed having the fuse as time pressure.

data/scenarios/Challenges/flower-count.yaml Outdated Show resolved Hide resolved
data/scenarios/Challenges/flower-count.yaml Show resolved Hide resolved
data/scenarios/Challenges/flower-count.yaml Outdated Show resolved Hide resolved
data/scenarios/Challenges/flower-count.yaml Outdated Show resolved Hide resolved
data/scenarios/Challenges/flower-count.yaml Show resolved Hide resolved
def forever = \c. c; forever c end

def judge =
numFlowers <- resonate "flower" ((-59,-19),(60,20));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a (off-by-one) bug in my code that I finally diagnosed by entering creative mode to use my own resonate command. Perhaps that is the intended use of creative mode, but it may be fun to have an "in-scenario" method to double-check one's count. Perhaps some oblique way to obtain a gradiator that is an instant-lose condition, but nonetheless can help a player debug.

data/scenarios/Challenges/flower-count.yaml Show resolved Hide resolved
data/scenarios/Challenges/flower-count.yaml Outdated Show resolved Hide resolved
mergify bot pushed a commit that referenced this pull request Jan 5, 2025
As I was trying to solve #2249, I was rather confused after trying to `meet` a built robot and `give` them an item, but the item was not delivered.  It turns out that I had been `meet`-ing the `judge` robot instead.

We should distinguish between robots that are intended to be interactive or not, and only allow `meet`-ing an interactive robot.
@byorgey byorgey added the merge me Trigger the merge process of the Pull request. label Jan 5, 2025
@mergify mergify bot merged commit 0c1d5f2 into main Jan 5, 2025
14 checks passed
@mergify mergify bot deleted the scenario/count-flowers branch January 5, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CHANGELOG Once merged, this PR should be highlighted in the changelog for the next release. merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants