My pet project for Advanced Software Engineering was inspired by a kaggle notebook. It is a Reinforcement Learning program for the game Tic Tac Toe. The program creates a neural network model for turn evaluations and is trained while playing against a programmed opponent. In the end a user can play against the trained model. In this documentation I will show UML diagrams and some metrics for the code, as well as some clean code concepts.
Following UML diagram shows the connection of all modules for the program.
The next diagram shows the user interaction when playing the game.
The third diagram shows the game process as a whole.
Sonarcube performs a scan with three different metrics in Bugs, Vulnerabilities and Code Smells and rates all three categories: Sonarcube rated the code with an overall rating of A. The scanner found 0 bugs and 0 vulnerabilities. It found some issues in the naming of variables but still gave an A rating in the Code Smells section.
My clean code principles are based on the 'clean code cheat sheet', which can be found here: Link
Example 1: General and Understandability
Example 2: High Cohesion
Example 3: Class Design
Example 4: Naming
Example 5: Methods
Domain Specific Language does not contibute to my project. A code snipped can be found here: dsl.py
(mostly) side effect free functions
the use of higher order functions
functions as parameters and return values
use clojures / anonymous functions: No usage of anonymous functions in that program.