> For the complete documentation index, see [llms.txt](https://ibjects-app.gitbook.io/intuitiveai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ibjects-app.gitbook.io/intuitiveai/understanding-stimulator/understanding-dataset.md).

# Understanding DataSet

In this subsection, we'll discuss what data does the simulator generates and how it is stored on the server and in the Google Sheet.

We use [Cloud FireStore](https://firebase.google.com/docs/firestore) to store all the data. **Cloud Firestore** is a scalable NoSQL Cloud Storage service by Firebase (A service by Google).

All the games played on the web or mobile simulator are pushed from Firestore to Google Sheets using a small service. This sheet is the Main sheet that holds information ready to be used for analysis.&#x20;

Here is the Master IntuitiveAI Dataset (Uncleaned) Sheet:

{% embed url="<https://docs.google.com/spreadsheets/d/1-9SaOmx2HAwQPbpjHVPw8OxMih1UH-NUVNxn4R2CyKI/edit?usp=sharing>" %}

{% hint style="warning" %}
We did some initial EDA of the IntuitiveAI Google Sheet above (<https://docs.google.com/spreadsheets/d/1-9SaOmx2HAwQPbpjHVPw8OxMih1UH-NUVNxn4R2CyKI/edit?usp=sharing>) on Google's CoLab and the explanation of the data is based on the cleaned version of this data. You can access that CoLab here: [**https://colab.research.google.com/drive/1rwPrzAS6J2lW0RVjqGaLpm4KaPwGGVdi?usp=sharing**](https://colab.research.google.com/drive/1rwPrzAS6J2lW0RVjqGaLpm4KaPwGGVdi?usp=sharing)
{% endhint %}

The sheet consists of 15 columns and below we've shared what each of the columns represents. After this brief description, we have added a simple example to help you understand the dataset better.

* **uniqueID**\
  Holds the path to a specific entry in our Database. Each entry must be unique in it.
* &#x20;**didUserFallInPit**\
  If the user falls in the Pit (🕳) we know it's a game lost and this will be true if that's the case.
* **didUserFindGold**\
  If the user finds gold (💰) while playing the game this value will be true. As this is an optional encouraged behavior in the game so you'll see its value to be true even if the user falls in the pit in some cases.
* **didUserFindMonster**\
  If the user finds the Monster (👹) this field will be true. If `didUserFallInPit` is true then this value must always be false and vice versa.
* **finalScore**\
  If the user falls in a pit that's a -1 score but if the user finds gold before falling in the pit that will be a 0 score and you'll see `didUserFallInPit` and `didUserFindGold` both be true in this case. If the user finds the monster that's a score of +1 and if the user finds gold before finding the monster that'll be the score of 2 and you'll find both `didUserFindGold` and `didUserFindMonster` will be true. So, in conclusion, this column can only contain one of these values -1, 0, 1, or, 2.
* **gameArrayPattern**\
  When a new game starts it'll randomize the entire grid. This column represents the graphical versions of what is on each index (0-15) on the board for example the first row of the grid will be the first four values of the array. All rows must have a total of 16 values.
* **gameArrayPatternIndex**\
  These represent the same full game grid but on a non-graphical version. For example, wherever there will be 11 in the array you'll see the monster (👹) at the same index of `gameArrayPattern` column. All rows must have a total of 16 values.
* **userGamePlayPattern**\
  When a new game starts one hint is revealed. The first value of the array represents that value. Then the rest of the values show which values use found as they played the game. If the game is lost you'll see a pit at the end of the array and just like that, you'll see .gold and monster in some games as well. This is the graphical representation of the user grid journey.
* **userGamePlayPatternIndex**\
  These represent the index of the grid. Meaning here 11 will not mean Monster, it'll be the 11th index of the grid and you can see which value is on index 11 from `gameArrayPattern` or `gameArrayPatternIndex`. Refer to the image example given below for a clearer picture.
* **logEntyDate**\
  Date and time of when the game entry was added to DB.

### Example

Consider this image below:

![A sample game of IntuitiveAI Simulator](https://527341639-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MJAkJFKBGKmBAJ_z1rq%2F-MRzwMM4LDu8yf4lf1sn%2F-MS-635D5Et3r_GxYAp4%2FA%20Game.png?alt=media\&token=0b74e4f6-9834-47e9-91b1-53014959d688)

The **RED** index values are showing the real value of the grid (*0-15 in a proper sequence*) whereas, the **BLUE** index values are the ones that were generated when **RED** values were randomized (*when a new game is started*).

**For `gameArrayPatternIndex` we look at the BLUE indexes.**\
**For `userGamePlayPatternIndex` we look at the RED indexes.**

Now if the `userGamePlayPattern` is: ❎,💨,💨,🕳️ \
you can say that when this game started the starting hint use got was ❎ and then the moved to 💨 and then again to 💨and finally fall in the pit and lost the game.

There is a problem with the above statement. We don't know which ❎was opened as we have two and also which 💨 did the use moved to?\
That's where `userGamePlayPatternIndex` comes to the rescue and makes the picture clear.&#x20;

Let's say the values for `userGamePlayPatternIndex` are: **3,7,2,9**\
now we can say with confidence that the ❎ which was opened was on RED index 3 and from there user opened index 7 which is 💨 and then index 2 and finally opened index 9 which was a pit and hence lost the game.

So this is how the data is stored. We tried to capture as much detail about a game played as possible.
