# Intra Projects Learn2Slither Edit

### Scale for project Learn2Slither

##### You should evaluate 1 student in this team

Git repository

### Introduction

Hello!
- remain polite, courteous, respectful and constructive
throughout the evaluation process. The well-being of the community
depends on it.
- identify with the person (or the group) evaluated the potential
dysfunctions of the work. Take the time to discuss
and debate the problems you have identified.
- you must consider that there might be some difference in how your
peers might have understood the project's instructions and the
scope of its functionalities. Always keep an open mind and grade
as honestly as possible. The pedagogy is valid only and
only if peer-evaluation is conducted seriously.

### Guidelines

- Only grade the work that is in the student or group's
GiT repository.
- Double-check that the GiT repository belongs to the student
or the group. Ensure that the work is for the relevant project
and also check that "git clone" is used in an empty folder.
- Check carefully that no malicious aliases were used to fool you
and make you evaluate something other than the content of the
official repository.
- To avoid any surprises, carefully check that both the evaluating
and the evaluated students have reviewed the possible scripts used
to facilitate the grading.
- If the evaluating student has not completed that particular
project yet, it is mandatory for this student to read the
entire subject prior to starting the defence.
- Use the flags available on this scale to signal an empty repository,
non-functioning program, a norm error, cheating etc. In these cases,
the grading is over and the final grade is 0 (or -42 in case of
cheating). However, with the exception of cheating, you are
encouraged to continue to discuss your work (even if you have not
finished it) in order to identify any issues that may have caused
this failure and avoid repeating the same mistake in the future.
- Remember that for the duration of the defence, no segfault,
no other unexpected, premature, or uncontrolled termination of
the program, is allowed, or the final grade is 0. Use the appropriate flag.
You should never have to edit any file except the configuration file if it exists.
If you want to edit a file, take the time to explain the reasons with the
evaluated student and make sure both of you are okay with this.

### Attachments

#### subject.pdf

### Mandatory Part

#### Error Management

- During the defense, as soon as you need help verifying a point, the student evaluated must help you.
- If the language used is Python you must check the norm (use the flag if there's a norm error) pip install flake8 alias norminette_python=flake8 norminette_python "student's project directory"

Yes No

#### Part 1 Environment/Board

Does the board resemble a game of Snake?
You can start a training session with a new model to verify.

Check the board rules:
• Board size: 10 by 10.
• Two green apples in a random cell.
• One red apple in a random cell.
• The snake starts with a length of 3 cells and randomly placed.
• If the snake hits a wall: Game over.
• If the snake collides with its own tail: Game over.
• The snake eats a green apple: increase snake's length by 1 and place a new green apple.
• The snake eats a red apple: decrease snake's length by 1 and place a new red apple.
• If the snake’s length drops to 0: Game over.
(Verify the main rules; some, like dying by eating only red apples, are difficult to test).

The board's speed should be appropriate for human observation.

Yes No

#### Part 2 State

The agent's vision (snake's head) should be displayed on the terminal with each movement of your snake.

The student should be able to demonstrate in their code that only the vision of the snake's head is provided to the agent (the AI making decisions).
If more information than just the state is sent to the agent, you must set the "Forbidden function" flag.
You are encouraged to review the subject thoroughly to fully understand which data is expected.

Yes No

#### Part 3 Action

The agent must make choices between (UP, LEFT, DOWN, RIGHT), and display the choice in the terminal.
The snake should move on the board accordingly.

Yes No

#### Part 4 Rewards

The student should be able to show you a training session where the snake eats apples.
They should also be able to explain how the rewards work
and the points given for each type of action:

• Eating a green apple
• Eating a red apple
• Snake's death
• ...

Yes No

#### Part 5 Q-learning

The student should be able to explain the Q-value and how they calculate it.
Only a Q-table or a Neural Network is allowed.
Use the "Forbidden function" tag/flag if any other model is used.
The implemented algorithm includes some random from time to time.

Yes No

#### Features and structure

Control that the remaining features are implemented:

- it is possible to train your model with a defined set of training sessions
- it is possible to import and export models before and after a series of training sessions, and multiple models with various training levels exist in the repository.
- it is possible to simply use a model without training it, for verification purposes
- a session can be carefully studied using the step-by-step flag. Verify also that the suggested architecture is present, or eventually a more suitable and/or efficient one.

Yes No

#### Testing trained models

Launch a few rounds with the best "backup" of the model (multiple ones are allowed, using
various parameters in the Q learning). Use the "non-training" switch, to keep the model
untouched.
Is the snake's length equal to or greater than 10 at the end of a session?
(The snake must have eaten 7 green apples, for example, without eating any red apples.)
This should happen more than 50% of the time with at least one model.

Yes No

### Bonus part

Evaluate the bonus part if, and only if, the mandatory part has been entirely and perfectly done. In case all the mandatory points were not passed during the defense, bonus points must be totally ignored.

#### Bonus Length test

Launch a few rounds with the best "backup" of the model.
You should award one point for every 5 units of length.
For example:
• < 15 = 0 point
• 15 <= x < 20 = 1 point
• 20 <= x < 25 = 2 point
• 25 <= x < 30 = 3 point
• 30 <= x < 35 = 4 point
• => 35 = 5 points (you can give the "Outstanding project" flag in case of success in this test)

Rate it from 0 (failed) through 5 (excellent)

#### Bonus Part 1

Is the board visually appealing, with starting and ending interfaces showing the score?

Yes No

#### Bonus Part 2

If the board size is modified using the same model file,
the snake should be able to continue playing without issues.
If the snake cannot achieve a minimum length of 7 for a map size between 8x8 and 15x15 (not 10x10),
this bonus should not be accepted.

Yes No

### Ratings

Don’t forget to check the flag corresponding to the defense

Ok Outstanding project
Empty work Incomplete work Norme Cheat Crash Concerning situation Can’t support / explain code

### Conclusion

Flag
OkIncomplete workNormeCheatCrashOutstanding projectConcerning situationCan’t support / explain codeEmpty work

Leave a comment on this evaluation ( 2048 chars max )

###

####

###

#### Flash modal content (raw)