> For the complete documentation index, see [llms.txt](https://bunring.gitbook.io/ctf-writeups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bunring.gitbook.io/ctf-writeups/try-hack-me/advent-of-cyber-2023/day-14.md).

# Day 14

Machine learning The Little Machine That Wanted to Learn

Learning Objectives

* What is machine learning?
* Basic machine learning structures and algorithms
* Using neural networks to predict defective toys

This is a straightforward room with all the commands and instructions given to us

{% code overflow="wrap" %}

```
What is the other term given for Artificial Intelligence or the subset of AI meant to teach computers how humans think or nature works?
[REDACTED]
```

{% endcode %}

```
What ML structure aims to mimic the process of natural selection and evolution?
[REDACTED]
```

{% code overflow="wrap" %}

```
What is the name of the learning style that makes use of labelled data to train an ML structure?
[REDACTED]
```

{% endcode %}

{% code overflow="wrap" %}

```
What is the name of the layer between the Input and Output layers of a Neural Network?
[REDACTED]
```

{% endcode %}

{% code overflow="wrap" %}

```
What is the name of the process used to provide feedback to the Neural Network on how close its prediction was?
[REDACTED]
```

{% endcode %}

```
ubuntu@tryhackme:~/Desktop/NeuralNetwork$ python3 detector.py 
Sample of our data:
Features:
[[ 2.34  1.66 11.06  1.    4.    7.  ]
 [ 8.78  1.18  9.48  5.    8.   14.  ]
 [ 2.73  2.29  8.86  6.   13.   14.  ]]
Defective?:
[0 0 0]
Sampe of our data after normalization:
Features:
[[-1.5920688  -0.97226669 -0.25226287 -0.99947684 -0.97240182 -0.30828496]
 [ 1.03457918 -1.45651003 -0.86716466  0.99976423 -0.08558604  1.23726592]
 [-1.43300161 -0.3366973  -1.10845523  1.4995745   1.02293369  1.23726592]]
Defective?:
[0 0 0]
Starting to training our Neural Network
Training has been completed, validating neural network now....
Total Correct:		18285
Total Incorrect:	1715
Network Accuracy:	91.425%
Now we will predict the testing dataset for which we don't have the answers for...
Saving predictions to a file
Predictions are saved, this file can now be uploaded to verify your Neural Network

```

{% code overflow="wrap" %}

```
What is the value of the flag you received after achieving more than 90% accuracy on your submitted predictions?
[REDACTED]
```

{% endcode %}

<figure><img src="https://2564342917-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjsQwj0hMRgqeOaja7rRi%2Fuploads%2Fx8nCJzBVbIu7pWIRAhsA%2Fimage.png?alt=media&amp;token=528d2e3e-b94a-43f9-ab30-8f83cfd91cfc" alt=""><figcaption><p>Flag recieved after file upload</p></figcaption></figure>
