## Brief 

The setup can be briefly described as follows: 

- Input data - vectors with integer coordinates ("test.csv")
- Solution -   for each input vector -  find sequences of "moves" such that applying it to the input vector one gets the fully sorted vector: (0,1,2,3,...).  How to find - that is the challenge. 
- To apply move-vectors to state-vector -  just do numpy reindexing: 
```python
state_vector[move1_vector][move2_vector]...[moveN_vector]
```  
- Submission: should contain the sequences of move names separated by dots for each sample,
also can be "UNSOLVED", then scores add 100 000 for each.
- Evaluation: sum of the lengths of solutions (how many moves used in total - i.e.  first count number of moves for each test sample and then sum over all  samples, for  each "UNSOLVED" will be added 100 000).

## Details

Here we repeat with more details what was briefly described above.

### States and moves  are integer vectors  (permutations)

To work with such puzzles on mathematical and programming levels, we assume each tile to be indexed with a unique number. In this setting each state of the puzzle is a permutation of the indices. The moves of the puzzle are permutations as well, which tell how the locations of the indices are swapped after the move.

In the scope of this competition we assume each tile to have a unique color. The puzzle is called to be "solved" if the **solution state** is achieved:
 
```python
solution_state = [0, 1, 2, 3, ...]
```  


### Input data - multiple integer vectors ("initial states" - permutations) 

Submissions are evaluated on a set of **initial states** of the puzzle. There are 1800 states in the test set. 

For each **initial state** the participant needs to provide a set of moves to get to the **solution state**. If there is a path in submission which doesn't lead to the **solution state**, the whole submission is considered invalid.

### Evaluation: score = number of moves

For a valid submission the final score are the sums of the lengths of all paths:

$$ score = \sum_{path \in Test}\mathrm{len}(path) $$

We also allow string "UNSOLVED" instead of actual solution, in that case score 100 000 would be added for each such string.

The lower the score the better the result is.

Some solutions paths used for generation the samples are provided in sample_submission.csv.


## Submission File
For each initial_state_id in the test set, you need to generate a path from the **initial state** (from test.csv to the **solution state** . 

The path is a string of dot-separated generator names. The generator are assumed to be applied to the **initial state** to the **solution state** starting from left to right.  The generators and the solution state can be found in "graphs_info.json".

Make sure that the values in  **initial_state_id** column are ordered from 0 to 1999.


| initial_state_id | path |
| :-------- | :-------: |
| 0 | R4.R2 |
| 1 | R2.R3.R2.R5 |
| 2 | R2.R3.R2.R4  |
|...|...|
