From 157303459b32de07f6989ba9131a38fc113754de Mon Sep 17 00:00:00 2001 From: InigoGutierrez Date: Fri, 10 Jun 2022 21:31:47 +0200 Subject: Structuring the different decision algorithms. --- doc/diagrams/DecisionAlgorithm.pumlc | 8 ++++++++ doc/diagrams/Keras.pumlc | 9 +++++++++ doc/diagrams/NeuralNetwork.pumlc | 8 ++++++++ doc/diagrams/analysisClasses.puml | 20 ++++++++++---------- doc/diagrams/keras.puml | 13 +++++++++++++ doc/diagrams/skinparams.puml | 3 +++ 6 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 doc/diagrams/DecisionAlgorithm.pumlc create mode 100644 doc/diagrams/Keras.pumlc create mode 100644 doc/diagrams/NeuralNetwork.pumlc create mode 100644 doc/diagrams/keras.puml (limited to 'doc') diff --git a/doc/diagrams/DecisionAlgorithm.pumlc b/doc/diagrams/DecisionAlgorithm.pumlc new file mode 100644 index 0000000..aada4f0 --- /dev/null +++ b/doc/diagrams/DecisionAlgorithm.pumlc @@ -0,0 +1,8 @@ +@startuml + +interface DecisionAlgorithm { + {abstract} forceNextMove(self, coords) + {abstract} pickMove(self) +} + +@enduml diff --git a/doc/diagrams/Keras.pumlc b/doc/diagrams/Keras.pumlc new file mode 100644 index 0000000..daca149 --- /dev/null +++ b/doc/diagrams/Keras.pumlc @@ -0,0 +1,9 @@ +@startuml + +class Keras { + forceNextMove(self, coords) + pickMove(self) + loadNetwork(self) +} + +@enduml diff --git a/doc/diagrams/NeuralNetwork.pumlc b/doc/diagrams/NeuralNetwork.pumlc new file mode 100644 index 0000000..30f783e --- /dev/null +++ b/doc/diagrams/NeuralNetwork.pumlc @@ -0,0 +1,8 @@ +@startuml + +class NeuralNetwork { + load(self, path) + save(self, path) +} + +@enduml diff --git a/doc/diagrams/analysisClasses.puml b/doc/diagrams/analysisClasses.puml index 4a286f7..d051cf9 100644 --- a/doc/diagrams/analysisClasses.puml +++ b/doc/diagrams/analysisClasses.puml @@ -7,24 +7,24 @@ package GameModule { class GameState class GameBoard class GameMove -} -GameIO -> GameState -GameState -> GameMove -GameMove -> GameBoard + GameIO -> GameState + GameState -> GameMove + GameMove -> GameBoard +} package EngineModule { class EngineIO class EngineLogic - interface DecisionAlgorithm + !include DecisionAlgorithm.pumlc class MonteCarloTreeSearch class OtherDecisionAlgorithm -} -EngineIO --> EngineLogic -EngineLogic -> DecisionAlgorithm -DecisionAlgorithm <|.. MonteCarloTreeSearch -DecisionAlgorithm <|.. OtherDecisionAlgorithm + EngineIO --> EngineLogic + EngineLogic -> DecisionAlgorithm + DecisionAlgorithm <|.. MonteCarloTreeSearch + DecisionAlgorithm <|.. OtherDecisionAlgorithm +} MonteCarloTreeSearch --> GameMove OtherDecisionAlgorithm --> GameMove diff --git a/doc/diagrams/keras.puml b/doc/diagrams/keras.puml new file mode 100644 index 0000000..98776d1 --- /dev/null +++ b/doc/diagrams/keras.puml @@ -0,0 +1,13 @@ +@startuml + +!include skinparams.puml + +!include DecisionAlgorithm.pumlc +!include Keras.pumlc +!include NeuralNetwork.pumlc + +DecisionAlgorithm <|.. Keras + +Keras -> NeuralNetwork + +@enduml diff --git a/doc/diagrams/skinparams.puml b/doc/diagrams/skinparams.puml index cde3da7..2a9e58e 100644 --- a/doc/diagrams/skinparams.puml +++ b/doc/diagrams/skinparams.puml @@ -1,5 +1,8 @@ @startuml +'Old style +skin rose + skinparam { monochrome true shadowing false -- cgit v1.2.1