The ULTIMATE trick-or-treating strategy that they don’t want you to know about!


WechatIMG756.jpeg

David Wang (ISB 12, Left) and Jeremy Ng (ISB 12, Right)

The golden STEM boys of senior year, David and Jeremy can be found geeking out in their shared math and physics classes.

In their collaborative BUDDY! debut, Jeremy and David hilariously explore the optimal way to trick-or-treat using AI and math.


Halloween serves as the only opportunity where it is socially acceptable to intrude upon one’s property and blackmail them with pranks and harassment if they do not hand over their personal property. Such an art, commonly known as trick or treating, has been an ancient craft inherited through the ancestry of our culture.  Hence, it is quite shameful to not take full advantage of such an opportunity to gain as much candy as possible.  

Figure 1. This candy could be yours

Figure 1. This candy could be yours

To optimise the amount of candy obtained in the art of trick-or-treating, the most important thing to consider is your own ability to keep going. As long as you have a will to get candy, there is a way. Therefore, your greatest enemy in trick-or-treating is yourself. Out in chilly October winds, your will to trick-or-treat diminishes. Yet, the candy you get along the way will be your holy grail, motivating you to continue. However, the number of houses you visit will increase over time, (and to be generally polite, we don’t recommend you revisit them again) while your fatigue slowly accumulates.

Figure 2. Candy and fatigue (Red: Fatigue, Blue: Total Candy

Figure 2. Candy and fatigue (Red: Fatigue, Blue: Total Candy

Hence, from the diagram provided, over a three hour time period (we recommend 6pm-9pm), we can see that the fatigue slowly surpasses your candy. Your will to continue will diminish.

Therefore, your motivation could be considered as the total candy obtained over time subtracted by your general fatigue at that point. Soon, the red line will take over the candy you obtain and you will be too tired and lose the motivation to trick-or-treat.

Hence, by differentiating the curve and extrapolating the stationary point, there exists an optimal time to sto-

 

Figure 3. Editor Emma’s feedback on our article

Figure 3. Editor Emma’s feedback on our article

We have censored our editor’s profane and (as we believe) unjustified language for the younger audiences.

 Following the precious advice of our beloved editor, we will stray from this math s**t and instead focus on writer David Wang’s only three friends, and how they would approach trick or treating.  

As it happens, all three of these friends are virtual, and was created by David himself. These three friends are Artificial Intelligence agents, who are trained through a method called Q-Learning. That means that each person will explore many, many potential paths. They will remember which combination of paths led to a lot of candy, and will take the best paths as it remembers from its training. Usually, the more potential paths each friend explores, the better each person will do.  

Figure 4. David Wang’s 3 friends

Figure 4. David Wang’s 3 friends

The first of David’s friends is called Timmy. Timmy is an average person, just like you and I. Timmy is 17 years old, and has gone trick or treating once each year since he was born (don’t question it, he’s imaginary). Hence, Timmy was trained on this path 17 times. Timmy chose to visit the top branch first, went to visit part of the bottom, but went back home after exploring a few houses. Timmy received 20 candies, 4 each from houses 1-5, and had a tiredness value of 20. Eating candy motivates you to keep walking, so if you have fewer candies than you have tiredness points, it means you don’t have enough candy to support your walking. Then, you will throw a tantrum, refuse to trick or treat further, call your parents to make them drive you home, and ruin the festive Halloween spirit for all your friends. Timmy had 20 candies and 20 tiredness points, cutting it real close to a temper tantrum. 

Yet another of David’s friends, named Bricky, did less well. Some who understand Bricky’s rough childhood may understand why. Bricky only went to Houses 1 to 3, and went back home immediately. Bricky was only trained on the path once – this was his second time trick-or-treating. Bricky only went to Houses 1 to 3, perhaps because the boy from House 4 had bullied him as a child.  

bricky.gif

But none of the two compare to David’s final friend. This man went to the gym everyday for the past 10 years to prepare for the walking. He got a perfect 45/45 on his IB diploma. Now, he is about to descent upon the compound to trick or treat. This man is named 𝕾𝖎𝖗 𝕭𝖊𝖓𝖏á𝖒ï𝖓 𝕯𝖎𝖈𝖐𝖎𝖓𝖘𝖔𝖓 𝖁. 𝕾𝖎𝖗 𝕭𝖊𝖓𝖏á𝖒ï𝖓 𝕯𝖎𝖈𝖐𝖎𝖓𝖘𝖔𝖓 𝖁 has trained on this path 50,000 times. He visited every house with the perfect route, getting 32 candies while only getting a tiredness score of 18. He, amongst David’s friends, serves as the ideal role model for the perfect trick-or-treater.  

Hence, having extensively observed the actions of David’s three friends and the brief mathematical analysis that was soon shut down, we can uncover the secret of the ULTIMATE trick-or-treat strategy.

1.     Avoid dead-ends 

Considering the path of Bricky, he immediately walked into the a dead-end and had a long walk back to the main road without any candy to collect, soon getting tired and losing motivation. When going on your trick-or-treat route, you should try to avoid dead-ends as much as possible, this way you can ensure that you are consistently collecting candy and won’t have to walk out of your dead-end with nothing to gain.

2.     Scout out the candy

You should ALWAYS keep track of the candy and plan your route ahead of time. By thinking forward, you can avoid houses you have been to and visit paths that have many houses along the way to collect the maximum candy possible. Remember: be like 𝕾𝖎𝖗 𝕭𝖊𝖓𝖏á𝖒ï𝖓 𝕯𝖎𝖈𝖐𝖎𝖓𝖘𝖔𝖓 𝖁 and always look ahead.

 A good idea is to have a map of your trick-or-treat region to scout locations and plan your route. For example, below is a map of the routes in River Garden (a popular trick-or-treat location):

Screen Shot 2020-10-30 at 10.45.34 AM.png

3.     Don’t tire yourself out

Before Editor Emma cut us off, remember that fatigue is your greatest enemy. So make sure you stay hydrated and have sufficient energy to keep going. Like a perpetual motion machine, you can fuel yourself from the candy you collect along the way. Additionally, don’t forget to wear sufficient clothing to keep you warm. This will allow you to maximise the candy you collect in your journey. 

The above methods have been 100% proven through the elaborate dissection of our innovative networks. This guaranteed strategy to trick-or-treating is fool-proof if done right. Happy trick-or-treating!


DavidW

JeremyN

Previous
Previous

How to Survive as Long as Possible in a Zombie Apocalypse

Next
Next

Mystery Behind Hinata’s Jump?!