Register
Submit a solution
The challenge is finished.

Challenge Overview

Introduction

Welcome to the Ninth Rapid Development Match Challenge!!

Rapid Development Matches or RDMs (as we love and would love the community to call them) are fast, timed software development competitions focused on ranking and scoring developers on code accuracy, speed, particular technologies, platforms, and development languages. The goal is clearly defined in the problems to be solved and the requirements to be achieved.

This is the Medium - 500 point problem of RDM-9

Please Note - The files linked in the specs will only be accessible after you register for the challenge.

Help Tina with her Coding Adventures!

Let’s begin writing a simple text adventure. Consider the following maze:

#######
#.....#
#.###.#
#.#G#.#
#.#.#.#
#.#...#
#@#####

The characters represent the following:

  • “@” is the player

  • “.” is a corridor

  • “#” is a wall

  • “G” is the gold treasure

In the game, the player can either move forward, or turn direction. The player can only see the one square in front, and nothing else. The objective is to find the golden treasure in the maze.

Technical steps:

  • Expose an API at port 8080 at /api
  • Calling GET /api/start will start the game, giving the initial status
  • POST /api/play with JSON body {"move": MOVE} plays the game for one move, where MOVE stands for one of:
  • "forward" will move the player forward and return the new status
  • "left" will turn the player 90 degrees left and return the new status
  • "right" will turn the player 90 degrees right and return the new status
  • The game ends when the player reaches the treasure

Specification:

The following cases should be implemented:

  • When the game starts, return {“Message”: “You find yourself in a dungeon. You remember coming here to look for a hidden treasure in the maze.”}

  • If the player sees a corridor, return {“Message”: “You see a corridor.”}

  • If the player sees a wall, return {“Message”: “You see a wall.”}

  • If the player sees the treasure, return {“Message”: “You see the treasure.” }

  • If the player reaches the treasure, return {“Message”: “You found the treasure!”}

  • Trying to leave the maze will end the game and return {“Message:” “You give up trying to find the treasure and leave the maze.”}

  • Moving towards a wall will not change the players position or direction

  • The dungeon is dark, so the player only sees one step ahead of him.

  • The player is initially facing forward (up).

  • Calling GET /start after already starting will reset the game to the beginning.

  • Calling any other command when the game is not started, or when the game is over, should return {“Message”: “Error.”}

Be sure to write the game messages exactly as specified. The maze in your program should be exactly the same as pictured above.

Sample submissions

Below are sample submissions for both Python/Flask and for ExpressJS:

code_python.zip

code_node.zip

Below is a sample tester with which you can test your solutions locally:

sample-and-tester.zip

Final Submission Guidelines

Submission Deliverables

Your submission must be a single ZIP file not larger than 10 MB containing just the code folder with the same structure as the one from the sample submission. The sample tester should not be included in the submission. Also make sure you don't submit any build folders generated locally like node_modules, dist etc. You must follow this submission folder structure so our automated test process can process your scoring:
Create a folder with “code” as the folder name then zip. Inside the “code” folder, there needs to be a file named Dockerfile. This is the docker file used to build the user’s submission. Refer to the provided Docker file in Sample Submission for each level. Zip that “code” folder and submit to the challenge. Execution Details and Submission Logs Each time you submit, the platform will leverage Docker to run your code. The execution logs will be saved as “Artifacts” that can be downloaded from the Submission Review App: https://submission-review.topcoder.com/.

Checking Passing and Failing Test Cases

Using the Submission Review App (https://submission-review.topcoder.com/), navigate to the specific challenge, then to your submission, and then to the Artifacts for your submission. The zip file you download will contain information about your submission including a result.json file with the test results.

Docker Structure:

Make sure you can run your submission with Docker from a clean slate. Your Docker needs to expose port: 8080. It needs to build on a completely clean machine when the platform runs your submission. If you are using something locally to build and run your submission, make sure it’s included as part of your Docker configuration as well. Please look at the sample submission to understand the structure better.

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30309367