Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Lets play a game

Author: zledge

Description

Do you prefer if/else of ML, or is it just the same to you?


`nc {{host}} {{port}}`


The solution will also work for the Let's play harder challenge. When you connect to the server it will explain the rules. You get 3 seconds to write where the requested shape is. There are 4 possible shapes: circle, rectangle, triangle and hexagon. There will be 200 of these tasks. It will then ask if you are ready.

By sending 'yes' the server will send a question back and then a base64 encoded png image.

Example:

Where is the circle (['nw', 'ne', 'sw', 'se'])?
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAARMklEQVR4nO3d3XIbxwGE0XWevN88uVAs05JAAsTu9vycc+FyORb3E8GaxsAV+zgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOA7/moH3CjtgImkHQBc7z/tgLukHTCXtAOA620zAAD82x4DkHbAjNIOAC62xwAA8JsNBiDtgHmlHQBcaYMBAOBPVh+AtANml3YAcJmlByDtgDWkHQBcY+kBAOCxdQcg7YCVpB0AXGDdAQDgU4sOQNoB60k7ADjbogPAFdIOAE614gCkHQA8Ke2AvS03AGkHrC3tAFaSD3+kYbkBAOA5aw1A2gE7SDuANeTBn3OjtQYAgKctNABpB+wj7QBmlyf+CtdbaAC4U9oBwNtWGYC0A4An5cW/zmWWGIC0A/aUdgAzyhv/K2dbYgAAeN38A5B2wM7SDmAuOenv4STzDwBdaQcA3zX5AKQdADwpF/ydvGfyAWAEaQcwvrQD+JOZByDtAOAiaQfsYdoBSDuAj9IOYGS58VfximkHAID3zDkAaQfwu7QDGFNKv5YnzDkAjCntAOAVEw5A2gHAkzLAV+CxCQeAkaUdwDjSDuArsw1A2gHAzdIOWNdUA5B2AM9IO4ARZOCvxt+mGgBmkXYA8IR5BiDtAOBJmeRrbm+eAWAuaQcAX5lkANIOAJ6UCb/yriYZAGaUdgD3SzuAV8w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1CUdsDAnP4LGPxFHGAAAGgYYwDSDqAi7YCBDf7OkeeN/FKOMQAA3G6YAUg7gJulHTCwkd8z8g3DvqDDDMDhRNhJ2gEDG/aw4B1jvqwjDQAANxpsANIO4AZpBwxszPeJnGLAF3ewATicDqtLOwD423gDcDgj1pV2wNgGfIfIuUZ7iYccAIBFDbUBow5A2gGcLu2AsQ11LrCJUQfgcF6sJe2AsTn9tzLOyz3wABxOjVWkHQD8ydgDABsY5/0gtxnkRR9+ANIO4E1pBwAPDD8AhxNkZmkHDG+Qd4Lcb4SXfoYBOJwjc0o7YHgjHAEU1X8AJhmAw2kym7QDgK/MMwCHM2UeaQfMoP7ujxF0fwymGoDDyTKDtAOA58w2AIfzZWxpB0zC239+Kv4wTDgAh1NmVGkHAK+YcwAOZ8140g6Yh7f//KL1I/FX5amnSTuAH9IOAF437Q3gh7QDOLwKMKvJB+Bw+rSlHQB81/wDcDiDetIOAN4w+T8D+EXaAftIOwB42xI3gJ/SDthE2gHAGdYagMPZdL20A4CTrPUR0EdpB6wn7QDgVMvdAH5KO2AxaQcAZ1t3AA5n1nnSDgAusO5HQB+lHTCvtAOAyyx9A/gp7YBJpR0AXGmPG8BPaQfMIu0A4HqbDcAPaQeMLO0A4C5bDsAPaQeMJu0A4F4bD8APaQeMIO0AoGH7Afgh7YCWtAOAHgPwQdoBd0o7AGgzAL9JO+BqaQcAYzAAj6UdcK60A4DBGICvpB3wvrQDgCEZgKelHfCqtAOAsRmAb0k74JG0A4B5GIC3ZfsAYE4G4GxZ4hHABgzALXL7LwQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIB1/Q/i0Ttc7uqRSQAAAABJRU5ErkJggg==

So the task seems to be to decode the image, find the shape and send back one of the four answers (sw/se/nw/ne)

On a correct answer the server will respond with:

Correct!
Where is the rectangle (['nw', 'ne', 'sw', 'se'])?
iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAARMkl ...

then at image 101 the question will change to include a color, and at some point the response also included what level you are on. Example:

Where is the white triangle (['nw', 'ne', 'sw', 'se'])?...

Solution:

All images are 512x512 pixels and there are always 4 shapes, one in each corner of the full image but the shapes themselves can vary in size.

One solution was to use python and cv2 functions to find shapes, shape placement and colors. Code can be found in solve.py (also works for "Let's play harder") and an example of image from the server in test.png.