![]() ![]() ‡ # Transliterate the current character according to these two strings S # Swap so the extracted head "RBGY" is at the top again ¾è # Index the strikes-counter `¾` into it, S # Swap so the remainder-list is at the top Ć # Extract head pop and push remainder-list and first item separately # Push compressed string "rbgybrygygbrgryb" ![]() Inputs in the order button-press sequence, flash sequence, where the flash sequence is a list of characters ( button-press sequence can be either a string or character-list, doesn't matter too much).Įxplanation: ε # Map over the characters of the first (implicit) button-press sequence input: ![]() RRRY (You cannot press buttons after the bomb detonates)Ġ5AB1E, 40 bytes ε.YBGRRB (You cannot press buttons anymore after the module is disarmed).RRR (The 3rd strike detonated the bomb).The followings are examples of button press sequences: Truthy Let's say the button flash sequence is GRYBB. Though in the game, a stage consists of up to 5 flashes, in this challenge, there may be an arbitrary nonzero number of flashes.Īn input not fitting to this format falls in don't care situation. The input shall be two strings consisting of R, B, G, and Y, indicating the colors. It is assumed for the purpose of this code-golf challange.) I/O format (This chart is for a bomb whose serial number has a vowel. The chart: Strikes\Flash Red Blue Green Yellow You must not press buttons anymore after the module is disarmed. Only up to 2 strikes are tolerable because a 3rd strike will detonate the bomb. ![]() You may press the wrong button in cost of a strike. These buttons shall be mapped accordingly to the chart below, and shall be pressed. In the original game, the module consists of multiple stages, but in this challenge, only one stage will be considered. Given a sequence of button flashes and a sequence of button presses, decide whether it would disarm the module. The Simon Says module consists of 4 colored buttons: Red, Blue, Green, and Yellow. Pattern that appears, except this one is a knockoff that was probably purchased atĪ dollar store. This is like one of those toys you played with as a kid where you have to match the In addition, some modules only print the instruction to the user, we could improve the program to bind solutions to a variable so that the modules could be combined easily to create a general solver.This challenge is from a game, Keep Talking And Nobody Explodes. In the future we could add user input to only ask for the necessary information as needed. What's next for Bomb DefusalĪs of now, the solvers require all potentially relevant information upfront. We also wrote each module in such a way that reuses useful subroutines that we already wrote like append, member, and listIndex. By encountering and solving common problems together, it allowed us to save time when we started working alone. Working on the first module together before dividing work was very helpful to our workflow. The programs have survived rigorous testing and perform as expected with any potential input. We were able to fully implement 5 different modules, each of which is able to handle any situation a diffuser could encounter. In addition, some bomb modules were not well suited for a s(CASP) implementation, so it was not feasible to implement each module’s solution. There was a bit of an adjustment period learning s(CASP) and its differences to Prolog. Since we were both relatively new to Prolog and s(CASP), so getting started was somewhat difficult. Additionally, we also received some help from the mentors on the HackReason discord. We also took advantage of Codeshare so that we could both work simultaneously on the same program at times. We wrote our code locally and tested it on the cslinux1 server. It is able to handle the Wires, Complicated Wires, Wire Sequences, Password, and Simon Says modules. The AI takes information about a bomb module, and following the set of rules, provides an instruction as to how to disarm it. Since the instructions follow a set of rules from a manual, we wondered if it was possible to replace the “expert” entirely with an AI. One player acts as the expert that feeds instructions to another player acting as the bomb defuser. The bomb is made up of several individual modules, each with specific rules and instructions on how to disarm them. In the game “Keep Talking and Nobody Explodes”, the object of the game is to defuse a bomb before the timer runs out. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |