ARC_Kaggle icon indicating copy to clipboard operation
ARC_Kaggle copied to clipboard

Implement EvolvingLine

Open alejandrodemiquel opened this issue 4 years ago • 6 comments

This issue targets at tasks that involve evolving lines. Some examples (not all) are tasks 790, 749, 748, 703, 679, 629, 605, 585, 573, 457, 344, 322, 283, 236, 231, 201, 198, 59, 23.

TODOs:

  • ~~Add the option 'jump' or 'skip' when encountering a fixed color. The line would just continue its way without coloring the fixed color.~~
  • ~~Add the option 'split'. The line would split in two when encountering an obstacle. See task 790 as example.~~
  • Turn after x steps. See task 749 as example.
  • Consider the cases in which the source color is different than the line color. See task 605 as example.
  • Add diagonal evolving lines.
  • Be color independent, as in task 236.
  • Add rules for the borders.
  • Consider sources that are not only a pixel.
  • ~~Modify direction after turning.~~
  • ~~Switch color. See task 435 as example.~~

alejandrodemiquel avatar May 02 '20 05:05 alejandrodemiquel

A prototype with some ideas was implemented in https://github.com/alejandrodemiquel/ARC_Kaggle/commit/e86627ebb6e0097c15e38413cb4fc24023f83e47

alejandrodemiquel avatar May 02 '20 05:05 alejandrodemiquel

In commit https://github.com/alejandrodemiquel/ARC_Kaggle/commit/3af9e16992b786db5c6669a069f6c5080c2f244d I uploaded the first working version. It solves tasks 344, 573 and 629.

It is not included in getPossibleOperations yet, but one can execute it by doing: f = Utils.getBestEvolvingLines(t) pred = f(t.testSamples[0].inMatrix)

alejandrodemiquel avatar May 02 '20 05:05 alejandrodemiquel

Tasks 679 and 790 are now solved after this commit https://github.com/alejandrodemiquel/ARC_Kaggle/commit/c29595171a5fd403b11a918b33715c19b6e0877d

It deals with modifying the direction of the line after turning and with splitting the line in two when an obstacle is found.

alejandrodemiquel avatar May 04 '20 05:05 alejandrodemiquel

Task 524 seems to enter an infinite loop:

Captura de Pantalla 2020-05-04 a les 17 36 04

RodericGuigoCorominas avatar May 04 '20 21:05 RodericGuigoCorominas

The problem with the task 524 was the definition of cic. I will leave it as cic=t.commonChangedInColors for now, but it would be nice to think how to expand it in order to cover more cases. For now, it doesn't affect any of the solved ones.

alejandrodemiquel avatar May 04 '20 23:05 alejandrodemiquel

See commit https://github.com/alejandrodemiquel/ARC_Kaggle/commit/07d81be0436a076467a9d08e0a64b195801e4f57 for update on "convert", solving task 435.

alejandrodemiquel avatar May 15 '20 00:05 alejandrodemiquel