## Brief 

The setup can be briefly described as follows: 

- central (solution) state off the puzzle -- a sorted vector of length 48  with elements from 0 to 47
- states of the puzzle -- permutations of the central state. Not every permutation is valid -- a valid state can be obtained from the central one by applying a sequence of moves
- Input data - a set of valid randomly generated states (1000 vectors)
- Solution (of a valid state) - a sequence of moves to transform a valid state to a central one. The challenge is to find the solutions for all input data.
- To apply move-vectors to state-vector -  just do numpy reindexing: 
```python
state_vector[ move1_vector][move2_vector]...[moveN_vector]
```  
- Central state, move names and corresponding vectors are stored in "puzzle_info.json".
- Submission: should contain the sequences of move names separated by dots for each sample, e.g. R.-DR.BR
- 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 1000 samples).

## Details

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

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


In the scope of this competition our puzzle has 120 tiles. The puzzle is called to be "solved" if the **solution state** is achieved:
 
```python
solution_state =[0,1,2,3,4,5, .... ]
```  

The full set of the moves can be found in "puzzle_info.json".

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

Submissions are evaluated on a set of **initial states** of the puzzle. There are 1000 states in the test set. They are obtained by applying random sequences of moves: the first state is obtained by applying a single random move, the second one -- by applying 2 constitutive random moves (independently from the previous sample), the third one -- by 3 moves and so on up to 1000. The moves are  sampled uniformly from the set of all possible moves. 

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) $$

The lower the score the better the result is.

The paths used for generation the samples are provided in "sample_submission.csv". These paths are highly non-optimal, however they can be used to get a valid submission.

## Submission File
For each initial_state_id in the test set, you need to generate a path from the **initial state**  "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 "puzzle_info.json" .

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


| initial_state_id | path |
| :-------- | :-------: |
| 0 |  DBLBBBR |
| 1 |  DBLBBBR.-DBLBBBR.-DBLBBBR  |
| 2 | -UBBBLL.-ULFR.DFLBL.-DBLBBBR|
|...|...|
