# Racing Birds ARENA

In this mode, the result of the competition depends entirely on the hash value of the blockchain data. Players who win the prediction will get massive $FMB and airdrops.

How to generate ARENA's Random number?

1. Finalize the prediction timestamp(TS);
2. Take the last 10 digits of hash as H;
3. Convert H from hexadecimal to decimal and then take modulo 720 (720 is the total number of racing bird results), get result R;
4. R+1 is substituted into the backtracking algorithm of the two-dimensional array to get the race result.

Assuming we have a two-dimensional array $a$, where $a\_{i,j}$ represents the element in row $i$ and column $j$. The backtracking algorithm usually uses a recursive function to traverse all possible solutions, with the following steps:

A. Define a recursive function with parameters including current row number $i$, current column number $j$, current state $s$.&#x20;

B. Check whether it meets the termination condition, if yes, return current state $s$.

C. Traverse all possible values of the current column, assuming that the current column value range is \[1,n], there are n possible values.&#x20;

D. For each possible value, check whether it meets constraint conditions. If yes, add this value to current state $s$ and recursively call a function to process the next row. If not, skip this value directly.

E. After the recursive call is completed, backtrack to current state $s$ and try the next possible value.&#x20;

In mathematical formula form, recursive function can be expressed as:&#x20;

$$ f(i,j,s) = \begin{cases} s & \text{if } \text{meets termination condition} \ \max\_{k \in \[1,n]} { f(i+1,j+1,s \cup {a\_{i,k}}) } & \text{otherwise} \end{cases} $$&#x20;

Where $s \cup {a\_{i,k}}$ means adding element $a\_{i,k}$ to current state $s$, $\max$ means taking the maximum value for all possible states.

## How to play ARENA:

Choose one of the 6 randomly chosen birds or choose a ranking you agree with. For example: you can only choose first place is bird 1, or you can choose first place is bird 1 + second place is bird 2 combination, you can choose to guess 5 birds’ rankings maximum. The more correct rankings you guess, the higher the odds, and the more generous the prize you can get.

<figure><img src="https://1585085413-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRfPVYZyDbXTj7yNppzYe%2Fuploads%2FWgJfK9ZruHkxZG1oDymm%2Farena.png?alt=media&#x26;token=c1e11188-5bba-4993-9821-764a58a8b759" alt=""><figcaption></figcaption></figure>
