[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.8310443 [View]
File: 125 KB, 1173x578, grids.png [View same] [iqdb] [saucenao] [google]
8310443

I have an interesting algorithm reverse-engineering problem, from a video game. Consider a grid of 256 tiles. Tiles can be one of the following: red, blue, yellow, orange, white, or empty. Red is harmful, blue and yellow are beneficial, and the rest are neutral.

Given only the portions of the 256 tiles which have each color, a "difficulty" value of 0 to 3 is given to the grid. I'm trying to determine the brief algorithm that does this.

Only integer math is involved here and it's highly likely that the last step of the very short algorithm is modulo by 4. Probably something simple like (red + blue mod 4).

Counts of red, blue, and yellow are the values most likely to be significant to the concept of "difficulty," but it's unknown whether the developers made an algorithm that's at all accurate to the challenge level of the grid.

Out of 127 possible grids in the grid, only 9 have a difficulty of 0, so I'll post the data for those first. I have data for all 127, which someone before me was able to determine for each grid, but who didn't make note of the algorithm to do it.

http://pastebin.com/raw/dFw4MdEP

Navigation
View posts[+24][+48][+96]