Add 'Programming/EARIN/' from commit 'a09c96dd651633b20dc0703840308e2e0d8376df'

git-subtree-dir: Programming/EARIN
git-subtree-mainline: 635e287095
git-subtree-split: a09c96dd65
This commit is contained in:
Krzysztof kuhy Rudnicki 2026-02-06 22:15:23 +01:00
commit be962d0c35
151 changed files with 8962 additions and 0 deletions

317
Programming/EARIN/.gitignore vendored Normal file
View File

@ -0,0 +1,317 @@
<<<<<<< HEAD
*.swp
.DS_Store
bin/configlet
bin/configlet.exe
temp.pl
=======
database
test_results
anime_with_synopsis.csv
anime.csv
animelist.csv
rating_complete.csv
watching_status.csv
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
# *.pdf
## Generated if empty string is given at "Please type another file name for output:"
.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# comment
*.cut
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
*.lzo
*.lzs
*.slg
*.slo
*.sls
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist
# gnuplot
*.gnuplot
*.table
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.glog
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
# *.tikz
*-tikzDictionary
# listings
*.lol
# luatexja-ruby
*.ltjruby
# makeidx
*.idx
*.ilg
*.ind
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# newpax
*.newpax
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# svg
svg-inkscape/
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# titletoc
*.ptc
# todonotes
*.tdo
# vhistory
*.hst
*.ver
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices and outlines
*.xyc
*.xyd
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# gummi
.*.swp
# KBibTeX
*~[0-9]*
# TeXnicCenter
*.tps
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# Makeindex log files
*.lpz
# xwatermark package
*.xwm
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
# Uncomment the next line to have this generated file ignored.
#*Notes.bib
>>>>>>> project/main

108
Programming/EARIN/.replit Normal file
View File

@ -0,0 +1,108 @@
# The command that runs the program. If the interpreter field is set, it will have priority and this run command will do nothing
run = "python3 main.py"
# The primary language of the repl. There can be others, though!
language = "python3"
entrypoint = "main.py"
# A list of globs that specify which files and directories should
# be hidden in the workspace.
hidden = ["venv", ".config", "**/__pycache__", "**/.mypy_cache", "**/*.pyc"]
# Specifies which nix channel to use when building the environment.
[nix]
channel = "stable-22_11"
# The command to start the interpreter.
[interpreter]
[interpreter.command]
args = [
"stderred",
"--",
"prybar-python310",
"-q",
"--ps1",
"\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ",
"-i",
]
env = { LD_LIBRARY_PATH = "$PYTHON_LD_LIBRARY_PATH" }
[env]
VIRTUAL_ENV = "/home/runner/${REPL_SLUG}/venv"
PATH = "${VIRTUAL_ENV}/bin"
PYTHONPATH = "$PYTHONHOME/lib/python3.10:${VIRTUAL_ENV}/lib/python3.10/site-packages"
REPLIT_POETRY_PYPI_REPOSITORY = "https://package-proxy.replit.com/pypi/"
MPLBACKEND = "TkAgg"
POETRY_CACHE_DIR = "${HOME}/${REPL_SLUG}/.cache/pypoetry"
# Enable unit tests. This is only supported for a few languages.
[unitTest]
language = "python3"
# Add a debugger!
[debugger]
support = true
# How to start the debugger.
[debugger.interactive]
transport = "localhost:0"
startCommand = ["dap-python", "main.py"]
# How to communicate with the debugger.
[debugger.interactive.integratedAdapter]
dapTcpAddress = "localhost:0"
# How to tell the debugger to start a debugging session.
[debugger.interactive.initializeMessage]
command = "initialize"
type = "request"
[debugger.interactive.initializeMessage.arguments]
adapterID = "debugpy"
clientID = "replit"
clientName = "replit.com"
columnsStartAt1 = true
linesStartAt1 = true
locale = "en-us"
pathFormat = "path"
supportsInvalidatedEvent = true
supportsProgressReporting = true
supportsRunInTerminalRequest = true
supportsVariablePaging = true
supportsVariableType = true
# How to tell the debugger to start the debuggee application.
[debugger.interactive.launchMessage]
command = "attach"
type = "request"
[debugger.interactive.launchMessage.arguments]
logging = {}
# Configures the packager.
[packager]
language = "python3"
ignoredPackages = ["unit_tests"]
[packager.features]
enabledForHosting = false
# Enable searching packages from the sidebar.
packageSearch = true
# Enable guessing what packages are needed from the code.
guessImports = true
# These are the files that need to be preserved when this
# language template is used as the base language template
# for Python repos imported from GitHub
[gitHubImport]
requiredFiles = [".replit", "replit.nix", ".config", "venv"]
[languages]
[languages.python3]
pattern = "**/*.py"
[languages.python3.languageServer]
start = "pylsp"
[deployment]
run = ["sh", "-c", "python3 main.py"]

View File

@ -0,0 +1,20 @@
{
<<<<<<< HEAD
"recommendations": [
<<<<<<< HEAD
"ms-python.python",
"ms-python.pylint",
"mikoz.black-py",
"james-yu.latex-workshop",
"kisstkondoros.vscode-gutter-preview",
"streetsidesoftware.code-spell-checker",
"wesbos.theme-cobalt2"
=======
"rebornix.prolog"
>>>>>>> lab7/main
]
}
=======
"recommendations": ["james-yu.latex-workshop"]
}
>>>>>>> project/main

15
Programming/EARIN/.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,15 @@
{
"python.linting.pylintArgs": [
"--generate-members"
],
"cSpell.words": [
"dtype",
"loadtxt",
"MNIST",
"optim",
"Xbatch",
"ybatch"
],
"python.linting.pylintEnabled": true,
"python.linting.enabled": true
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,8 @@
Manhattan:
For: 1000 files, sum of path lengths = 122194, average path length = 122.194, sum_of_time = 0.8560767570011194, average time to solve: 0.0008560767570011194, heuristic_total_total_time: 0.10561735888813928, all_heuristic_called: 282721, average_heuristic_time: 3.735745094568118e-07
Euclidean:
For: 1000 files, sum of path lengths = 120936, average path length = 120.936, sum_of_time = 1.268625628994414, average time to solve: 0.001268625628994414, heuristic_total_total_time: 0.34228658579650073, all_heuristic_called: 276120, average_heuristic_time: 1.2396298196309602e-06
Random:
For: 1000 files, sum of path lengths = 131126, average path length = 131.126, sum_of_time = 1.2832818229990153, average time to solve: 0.0012832818229990153, heuristic_total_total_time: 0.07322999603366043, all_heuristic_called: 417262, average_heuristic_time: 1.7550123431719262e-07

View File

@ -0,0 +1,20 @@
To run the program install python, go to project repository and just run python main.py:
python main.py
you can specify the name of the file which stores maze by typing:
python main.py mazeFile.txt
python main.py -h --help print help prompt
python main.py -t --test non interactive (does not print steps) for testing
different heuristics, goes through entire generatedMazes folder and
compares heuristic speed and path length, saves solved mazes to solvedMazes folder
python main.py -t --test [FOLDER] non interactive (does not print steps) for testing
different heuristics, goes through entire [FOLDER] folder and
compares heuristic speed and path length, saves solved mazes to solvedMazes folder
python main.py -g --generate [NUMBER] - generates as many mazes as entered in
Number parameter and puts it in the generatedMazes folder

View File

@ -0,0 +1,377 @@
"""
Write horizontal_line program that solves horizontal_line maze
using greedy best-first search algorithm.
The maze is horizontal_line 2D grid
with empty space, walls, horizontal_line start, and an end position.
The objective is to find horizontal_line path from start to end position.
The maze should be loaded from file. horizontal_line step-by-step visualization of the
algorithm is required. It can be done in the console and an interface may be
as simple as possible (but of course it does not have to). Example solution:
https://angeluriot.com/maze_solver/.
Test multiple heuristics (at least two) h(n) and discuss the differences be-
tween the obtained results.
Technical requirements:
- implemented in Python.
- adheres to basic standards of lean coding in accordance to PEP8
- comments in the crucial parts to help with readability and understanding.
- The clear instruction how to run and test the code should be included.
Thinks that do not work:
Does not work if no Start (Should print out NO START FOUND)
Does not work if no End (Should print out NO END FOUND)
Does not work if no path (Should print out NO PATH FOUND)
"""
import heapq
import sys
import time
import os
from random import shuffle, randrange, random
class MazeSolver:
"""Maze Solver"""
# self corresponds to "this" in js, it refers to object of MazeSolver class
def __init__(self, maze, mode):
# assign read maze 2D array to parameter from class MazeSolver
self.test = mode
self.maze = maze
self.start, self.end = self.find_start_and_end()
# go through each character in 2D array and find one that corresponds to
# Start/End character
def find_start_and_end(self):
"""Finds start and end points in the maze"""
start = end = None
for row_i, row in enumerate(self.maze):
for col_i, cell in enumerate(row):
if cell == "S":
start = (row_i, col_i)
elif cell == "E":
end = (row_i, col_i)
if start is not None and end is not None:
return start, end
print(f"DID NOT FOUND START OR END, Start: {start}, End: {end}")
return start, end
# Go through each neighbor
# N
# N * N
# N
# If it is not horizontal_line "wall" (#) add its position to list of neighbors
def get_neighbors(self, position):
"""Finds point'maze_data neighbors"""
row, col = position
neighbors = []
if row > 0 and self.maze[row - 1][col] != "#":
neighbors.append((row - 1, col))
if col > 0 and self.maze[row][col - 1] != "#":
neighbors.append((row, col - 1))
if row < len(self.maze) - 1 and self.maze[row + 1][col] != "#":
neighbors.append((row + 1, col))
if col < len(self.maze[row]) - 1 and self.maze[row][col + 1] != "#":
neighbors.append((row, col + 1))
return neighbors
# find path through maze
def solve_loop(self, queue, visited):
""" Goes through maze and finds the path """
heuristic_total_time = 0
heuristics_called = 0
while queue:
# pop first element of heap
# first value is skipped and we only save current position and path
# on heap
_, current, path = heapq.heappop(queue)
# if we already visited current skip code and go to next iteration
if current in visited:
continue
# if we found the end return path
if current == self.end:
break
visited.add(current)
for neighbor in self.get_neighbors(current):
if neighbor not in visited:
new_path = path + [neighbor]
heuristic, heuristic_time = self.heuristic_euclidean(
neighbor)
heuristic_total_time += heuristic_time
heuristics_called += 1
heapq.heappush(
queue, (heuristic, neighbor, new_path)
)
if not self.test:
print_maze(self.maze, path, visited)
print()
return path, visited, heuristic_total_time, heuristics_called
def solve(self):
"""Solves the maze"""
queue = []
# set means that values inside can not repeat
visited = set()
# https://docs.python.org/3/library/heapq.html
# push onto the queue (which becomes heapq), element containing values
# we use heapq so the element with lowest heuristic value will always
# be at the top of heap
heuristic = self.heuristic_euclidean(self.start)
heapq.heappush(
queue, (heuristic, self.start, [self.start])
)
# Go through queue until it'maze_data empty
# Find neighbor (which is not wall) closest to the
# END point (based on heuristic)
# Go there and repeat
# if cannot find path it starts over but skips the path that lead it to
# dead end
return self.solve_loop(queue, visited)
# This heuristic returns the Manhattan distance between the given position
# and the maze'maze_data end
def heuristic_manhattan(self, position):
"""Heuristic function that uses Manhattan distance"""
start_time = time.perf_counter()
heuristic = abs(position[0] - self.end[0]) + \
abs(position[1] - self.end[1])
end_time = time.perf_counter()
heuristic_time = end_time - start_time
return heuristic, heuristic_time
# This heuristic returns the Euclidean distance between the given position
# and the maze'maze_data end
def heuristic_euclidean(self, position):
"""Heuristic function that uses Euclidean distance"""
start_time = time.perf_counter()
heuristic = (
abs(position[0] - self.end[0]) ** 2 +
abs(position[1] - self.end[1]) ** 2
) ** 0.5
end_time = time.perf_counter()
heuristic_time = end_time - start_time
return heuristic, heuristic_time
def heuristic_random(self, position):
"""Heuristic function that just returns random value between 0 and 1"""
start_time = time.perf_counter()
heuristic = random()
end_time = time.perf_counter()
heuristic_time = end_time - start_time
return heuristic, heuristic_time
# Open and load text file to array
def load_maze(maze_file_name):
"""Loads horizontal_line maze from the specified file"""
# Open for reading only and save to fileContents
with open(maze_file_name, "r", encoding="utf8") as file_contents:
# strip() removes extra white spaces from the beginning and the end of
# horizontal_line string
# list() changes string to array of chars
# Inside of square brackets we will have an array of characters for
# each line of file
# After going through every line in horizontal_line file we will have 2D array of arrays
# of characters of every line
maze = [list(line.strip()) for line in file_contents]
return maze
def print_maze(maze, path=None, visited=None):
"""Prints the maze"""
if path is None:
path = []
if visited is None:
visited = []
for row_i, row in enumerate(maze):
for col_i, cell in enumerate(row):
if (row_i, col_i) in path and cell == " ":
print("*", end="")
elif (row_i, col_i) in visited and cell == " ":
print("·", end="")
else:
print(cell, end="")
print()
def create_maze_folder(solved):
""" Creates folder for generated or solved mazes"""
if solved:
folder_name = "solvedMazes"
else:
folder_name = "generatedMazes"
if not os.path.exists(folder_name):
os.mkdir(folder_name)
return folder_name
def save_maze(maze, solved=True, path=None, visited=None, saved_file="Maze", iteration=0):
"""Saves maze from array to txt file"""
folder_name = create_maze_folder(solved)
if path is None:
path = []
if visited is None:
visited = []
with open(f"{folder_name}/{iteration}{os.path.basename(saved_file)}", "w", encoding="utf8") as maze_file:
for row_i, row in enumerate(maze):
for col_i, cell in enumerate(row):
if (row_i, col_i) in path and cell == " ":
maze_file.write("*")
elif (row_i, col_i) in visited and cell == " ":
maze_file.write("·")
else:
maze_file.write(cell)
if solved:
maze_file.write("\n")
if not solved:
maze_file.write("\n")
def fill_generated_maze(hor, ver, width):
""" Fills generated maze array from horizontal and vertical lines """
maze_data = ""
for horizontal_line, vertical_line in zip(hor, ver):
maze_data += "".join(horizontal_line + ["\n"] + vertical_line + ["\n"])
maze_data_list = list(maze_data)
maze_data_list[3 * width + 3] = "S"
maze_data_list[len(maze_data_list) - (3 * width + 6)] = "E"
maze_data = "".join(maze_data_list)
return maze_data
def make_maze(width=16, height=8):
""" generate maze with given width and height """
vis = [[0] * width + [1] for _ in range(height)] + [[1] * (width + 1)]
ver = [["# "] * width + ["#"] for _ in range(height)] + [[]]
hor = [["###"] * width + ["#"] for _ in range(height + 1)]
def walk(x_coordinate, y_coordinate):
vis[y_coordinate][x_coordinate] = 1
neighbors = [(x_coordinate - 1, y_coordinate),
(x_coordinate, y_coordinate + 1),
(x_coordinate + 1, y_coordinate),
(x_coordinate, y_coordinate - 1)]
shuffle(neighbors)
for x_coordinate_neighbor, y_coordinate_neighbor in neighbors:
if vis[y_coordinate_neighbor][x_coordinate_neighbor]:
continue
if x_coordinate_neighbor == x_coordinate:
hor[max(y_coordinate, y_coordinate_neighbor)
][x_coordinate] = "# "
if y_coordinate_neighbor == y_coordinate:
ver[y_coordinate][max(
x_coordinate, x_coordinate_neighbor)] = " "
walk(x_coordinate_neighbor, y_coordinate_neighbor)
walk(randrange(width), randrange(height))
return fill_generated_maze(hor, ver, width)
def print_help():
"""prints help"""
print(
"""python main.py - run the script against default maze file
(any file named maze.txt in the code directory)
python main.py filename.txt - run the script against filename.txt file
python main.py -h --help print this prompt
python main.py -t --test non interactive (does not print steps) for testing
different heuristics, goes through entire generatedMazes folder and
compares heuristic speed and path length
python main.py -t --test [FOLDER] non interactive (does not print steps) for testing
different heuristics, goes through entire [FOLDER] folder and
compares heuristic speed and path length
python main.py -g --generate [NUMBER] - generates as many mazes as entered in
Number parameter and puts it in the generatedMazes folder"""
)
def test_mode():
""" Loads and solves multiple mazes in order to compare heuristics """
create_maze_folder(False)
sum_of_paths = 0
files_amount = 0
sum_of_time = 0
heuristic_total_total_time = 0
all_heuristic_called = 0
for filename in os.listdir(FOLDER_NAME):
filename_directory = os.path.join(FOLDER_NAME, filename)
# Open and load text file to array
loaded_maze = load_maze(filename_directory)
# Initialize MazeSolver object with maze as parameter
solver_test = MazeSolver(loaded_maze, TEST_MODE)
# Find path using MazeSolver solve method
start_time = time.perf_counter()
solved_path, visited, heuristic_total_time, heuristics_called = solver_test.solve()
heuristic_total_total_time += heuristic_total_time
all_heuristic_called += heuristics_called
end_time = time.perf_counter()
sum_of_time += end_time - start_time
sum_of_paths += len(solved_path)
save_maze(loaded_maze, True, solved_path, visited, filename, 0)
files_amount += 1
if files_amount == 0:
print("no mazes found! Generate some using python main.py -g [NUMBER]")
sys.exit()
average_path = sum_of_paths / files_amount
average_time = sum_of_time / files_amount
print(f"""For: {files_amount} files,
sum of path lengths = {sum_of_paths},
average path length = {average_path},
sum_of_time = {sum_of_time},
average time to solve: {average_time},
heuristic_total_total_time: {heuristic_total_total_time},
all_heuristic_called: {all_heuristic_called},
average_heuristic_time: {heuristic_total_total_time / all_heuristic_called}""")
def default():
""" Runs default operation - reads, solves and prints single maze from file """
# Open and load text file to array
loaded_maze = load_maze(FILE_NAME)
# Initialize MazeSolver object with maze as parameter
solver = MazeSolver(loaded_maze, TEST_MODE)
# Find path using MazeSolver solve method
solved_path, visited, _, _ = solver.solve()
print_maze(loaded_maze, solved_path, visited)
save_maze(loaded_maze, True, solved_path, visited, FILE_NAME, 0)
# Ran first in the code
if __name__ == "__main__":
# print(sys.argv)
FILE_NAME = "maze.txt"
TEST_MODE = False
FOLDER_NAME = ""
GENERATE_AMOUNT = 0
if len(sys.argv) > 1:
if sys.argv[1] == "-h" or sys.argv[1] == "--help":
print_help()
sys.exit()
if sys.argv[1] == "-t" or sys.argv[1] == "--test":
TEST_MODE = True
FILE_NAME = "maze.txt"
FOLDER_NAME = "generatedMazes"
if len(sys.argv) > 2:
FOLDER_NAME = sys.argv[2]
test_mode()
sys.exit()
if sys.argv[1] == '-g' or sys.argv[1] == '--generate':
if len(sys.argv) > 2:
GENERATE_AMOUNT = int(sys.argv[2])
for n in range(GENERATE_AMOUNT):
GENERATED_MAZE = make_maze()
save_maze(GENERATED_MAZE, False, None,
None, f'generated{n}.txt')
sys.exit()
FILE_NAME = sys.argv[1]
default()

View File

@ -0,0 +1,10 @@
##########
#S #
# #### #
# # #
# # ## #
# # #
##### ##
# # #
# #E #
##########

View File

@ -0,0 +1,10 @@
##########
#******* #
# ####* #
# # **#
# # ##*#
# #**#
##### *##
# # * #
# #* #
##########

View File

@ -0,0 +1,2 @@
Overleaf:
https://www.overleaf.com/7651537119ycszfgvxqznm

Binary file not shown.

View File

@ -0,0 +1,581 @@
"""
Program that plays draughts (checkers) with user on 8x8 board using min-max with alpha-beta pruning
"""
import re
import copy
import math
import sys
class Game:
"""Game"""
def __init__(self, size):
self.board_size = size
self.white_positions = self.initialize_white()
self.black_positions = self.initialize_black()
def initialize_white(self):
"""Initialize white pieces"""
white_positions = []
for y_coordinate in range(math.floor((self.board_size - 2) / 2)):
for x_coordinate in range(self.board_size):
if y_coordinate % 2 == 0:
if x_coordinate % 2 == 1:
white_positions.append((x_coordinate, y_coordinate, False))
else:
if x_coordinate % 2 == 0:
white_positions.append((x_coordinate, y_coordinate, False))
return white_positions
def initialize_black(self):
"""Initialize black pieces"""
black_positions = []
for y_coordinate in range(
self.board_size - math.floor((self.board_size - 2) / 2), self.board_size
):
for x_coordinate in range(self.board_size):
if y_coordinate % 2 == 0:
if x_coordinate % 2 == 1:
black_positions.append((x_coordinate, y_coordinate, False))
else:
if x_coordinate % 2 == 0:
black_positions.append((x_coordinate, y_coordinate, False))
return black_positions
def check_move_out_of_bounds(self, to_):
"""Check if the move destination is out of the bounds of the board"""
if to_[0] < 0 or to_[0] > self.board_size - 1:
# print(f"Illegal move! Final x coordinate must be between 0 and {self.board_size-1}!")
return True
if to_[1] < 0 or to_[1] > self.board_size - 1:
# print(f"Illegal move! Final y coordinate must be between 0 and {self.board_size-1}!")
return True
return False
def check_piece_exists(self, coords, color):
"""Check if a piece of given color exists at a given spot"""
if color == "white":
if any(
piece in self.white_positions
for piece in ((*coords, False), (*coords, True))
):
return True
else:
if any(
piece in self.black_positions
for piece in ((*coords, False), (*coords, True))
):
return True
return False
def check_piece_king(self, coords, color):
"""Check if a piece of in a given spot and of a given color is a king.
Return false if no piece is found"""
if color == "white":
return (*coords, True) in self.white_positions
if color == "black":
return (*coords, True) in self.black_positions
return False
# https://stackoverflow.com/a/2191707
def check_move_piece_capable(self, from_, to_, color):
"""Check if the move is exactly one square diagonally"""
if abs(to_[0] - from_[0]) == 1:
if self.check_piece_king(from_, color):
return True
if color == "white":
return to_[1] == from_[1] + 1
if color == "black":
return to_[1] == from_[1] - 1
return False
def check_capture(self, from_, to_, color):
"""Check if a piece was captured for a given move.
Return captured piece coordinates or None"""
# captures can only happen if the player moved twice-diagonally
if abs(to_[0] - from_[0]) != 2 or abs(to_[1] - from_[1]) != 2:
return None
middle = (abs(to_[0] + from_[0]) // 2, abs(to_[1] + from_[1]) // 2)
if color == "white" and self.check_piece_exists(middle, "black"):
return middle
if color == "black" and self.check_piece_exists(middle, "white"):
return middle
return None
def check_move_legal(self, from_, to_, color, give_feedback=False):
"""Check if a move is legal. Return a boolean or coordinates of captured piece"""
if self.check_move_out_of_bounds(to_):
if give_feedback:
print("Illegal move! Final position is out of the bounds of the board")
return False
if not self.check_piece_exists(from_, color):
if give_feedback:
print(
"Illegal move! There is no piece on the "
"starting position that belongs to the player"
)
return False
if self.check_piece_exists(to_, "white") or self.check_piece_exists(
to_, "black"
):
if give_feedback:
print("Illegal move! Cannot move to position taken by another piece")
return False
capture = self.check_capture(from_, to_, color)
if capture is None:
if self.check_move_piece_capable(from_, to_, color):
return True
if give_feedback:
print("Illegal move! You can only move diagonally")
return False
return capture
def make_move(self, from_, to_, color):
"""Move a piece on the board and remove any captured pieces"""
move_legal = self.check_move_legal(from_, to_, color)
if move_legal is False:
return False
capture = move_legal if isinstance(move_legal, tuple) else None
king = self.check_piece_king(from_, color)
if color == "white":
self.white_positions.remove((*from_, king))
if capture:
captured_king = self.check_piece_king(capture, "black")
self.black_positions.remove((*move_legal, captured_king))
if to_[1] == self.board_size - 1:
self.white_positions.append((*to_, True))
else:
self.white_positions.append((*to_, king))
else:
self.black_positions.remove((*from_, king))
if capture:
captured_king = self.check_piece_king(capture, "white")
self.white_positions.remove((*move_legal, captured_king))
if to_[1] == 0:
self.black_positions.append((*to_, True))
else:
self.black_positions.append((*to_, king))
return True
def print_board(self, rotate=False):
"""Print the board in the console"""
def print_letters():
"""Print the letters above or under the board"""
print(" ", end="")
for col in range(self.board_size):
if rotate:
print(f" {chr(ord('a')+self.board_size-1-col)}", end=" ")
else:
print(f" {chr(ord('a')+col)}", end=" ")
def get_square_code(pos, background):
"""Return the code of a given square on the board"""
if (*pos, False) in self.white_positions:
return "w"
if (*pos, True) in self.white_positions:
return "W"
if (*pos, False) in self.black_positions:
return "b"
if (*pos, True) in self.black_positions:
return "B"
return background
print_letters()
print(" ")
row_range = (
range(self.board_size * 4)
if not rotate
else reversed(range(self.board_size * 4))
)
line = 0
for row in row_range:
for col in range(self.board_size):
background = "#" if (col % 2 == (row // 4) % 2) != rotate else " "
checker = (
get_square_code((col, row // 4), background)
if not rotate
else get_square_code(
(self.board_size - 1 - col, row // 4), background
)
)
if col == 0:
if line % 4 == 2:
print(f"{row//4:3d}", end="")
else:
print(" ", end="")
match line % 4:
case 0:
print("+---", end="")
case 1 | 3:
print(f"|{3*background}", end="")
case 2:
print(f"|{background}{checker}{background}", end="")
if line % 4 == 0:
print("+")
else:
print(f"|{row//4}" if line % 4 == 2 else "|")
line += 1
print(" ", end="")
for col in range(self.board_size):
print("+---", end="")
print("+")
print_letters()
print()
# Ran first in the code
def get_possible_moves_capture(self, from_, color):
"""Return all possible captures for a piece"""
# all capturing moves:
legal_moves = []
move_down_left_two = (from_[0] + 2, from_[1] - 2)
move_down_right_two = (from_[0] + 2, from_[1] + 2)
move_up_left_two = (from_[0] - 2, from_[1] - 2)
move_up_right_two = (from_[0] - 2, from_[1] + 2)
if self.check_move_legal(from_, move_down_left_two, color) is not False:
legal_moves.append((from_, move_down_left_two))
if self.check_move_legal(from_, move_down_right_two, color) is not False:
legal_moves.append((from_, move_down_right_two))
if self.check_move_legal(from_, move_up_left_two, color) is not False:
legal_moves.append((from_, move_up_left_two))
if self.check_move_legal(from_, move_up_right_two, color) is not False:
legal_moves.append((from_, move_up_right_two))
return legal_moves
def get_possible_moves_non_capture(self, from_, color):
"""Return all possible moves that are not captures for a piece"""
# all non-capturing moves
legal_moves = []
move_down_left_one = (from_[0] + 1, from_[1] - 1)
move_down_right_one = (from_[0] + 1, from_[1] + 1)
move_up_left_one = (from_[0] - 1, from_[1] - 1)
move_up_right_one = (from_[0] - 1, from_[1] + 1)
if self.check_move_legal(from_, move_down_left_one, color) is not False:
legal_moves.append((from_, move_down_left_one))
if self.check_move_legal(from_, move_down_right_one, color) is not False:
legal_moves.append((from_, move_down_right_one))
if self.check_move_legal(from_, move_up_left_one, color) is not False:
legal_moves.append((from_, move_up_left_one))
if self.check_move_legal(from_, move_up_right_one, color) is not False:
legal_moves.append((from_, move_up_right_one))
return legal_moves
def get_possible_moves(self, color):
"""Return all possible moves for a given piece color"""
legal_moves = []
captures = []
if color == "white":
for white_position in self.white_positions:
# print((white_position[0], white_position[1]))
legal_moves += self.get_possible_moves_non_capture(
(white_position[0], white_position[1]), color
)
captures += self.get_possible_moves_capture(
(white_position[0], white_position[1]), color
)
elif color == "black":
for black_position in self.black_positions:
legal_moves += self.get_possible_moves_non_capture(
(black_position[0], black_position[1]), color
)
captures += self.get_possible_moves_capture(
(black_position[0], black_position[1]), color
)
if len(captures) > 0:
return (captures, True)
return (legal_moves + captures, False)
def alpha_beta(self, depth, alpha_beta, color, current_color=None):
"""Do alpha beta pruning for given parameters
and return the best move and its evaluated points"""
if current_color is None:
current_color = color
if depth == 0:
return self.evaluate(color), None
alpha, beta = alpha_beta
opposite_color = "white" if current_color == "black" else "black"
if current_color == color:
max_eval = float("-inf")
best_move = None
for move in self.get_possible_moves(current_color)[0]:
new_state = copy.deepcopy(self)
new_state.make_move(*move, current_color)
eval_, _ = new_state.alpha_beta(
depth - 1, alpha_beta, color, opposite_color
)
if eval_ > max_eval:
max_eval = eval_
best_move = move
alpha = max(alpha, eval_)
if alpha >= beta:
break
return max_eval, best_move
if opposite_color == color:
min_eval = float("inf")
best_move = None
for move in self.get_possible_moves(current_color)[0]:
new_state = copy.deepcopy(self)
new_state.make_move(*move, current_color)
eval_, _ = new_state.alpha_beta(
depth - 1, alpha_beta, color, opposite_color
)
if eval_ < min_eval:
min_eval = eval_
best_move = move
beta = min(beta, eval_)
if beta <= alpha:
break
return min_eval, best_move
return None
def evaluate(self, color):
"""Evaluates the state of the board for a given color"""
white_score = 0
black_score = 0
for white_position in self.white_positions:
if white_position[2]:
white_score += 10
else:
white_score += 5
for black_position in self.black_positions:
if black_position[2]:
black_score += 10
else:
black_score += 5
return (
white_score - black_score if color == "white" else black_score - white_score
)
def input_to_coordinates(self, user_input):
"""Change input from a1 form to tuple form"""
pos_x = ord(user_input[0]) - ord("a")
pos_y = int(user_input[1::])
return pos_x, pos_y
def handle_player_move(self, color):
"""Prompt player to move, validate their input and make move"""
has_moved = False
possible_moves = self.get_possible_moves(color)[0]
while not has_moved:
user_input = input(
f"You are {color}. How do you want to move? (format: d6 e5)\n"
)
regex = r"^[a-z]\d+\s[a-z]\d+$"
match = re.search(regex, user_input)
if not match:
print("Invalid input, try again")
continue
[move_from, move_to] = user_input.split(" ")
from_coordinates = self.input_to_coordinates(move_from)
to_coordinates = self.input_to_coordinates(move_to)
if not (from_coordinates, to_coordinates) in possible_moves:
legal_no_captures = self.check_move_legal(
from_coordinates, to_coordinates, color, True
)
if legal_no_captures:
print("Invalid move! You can capture a piece")
continue
has_moved = self.make_move(from_coordinates, to_coordinates, color)
self.print_board(color == "white")
def start_game(self, player_color="black", algorithm_depth=5):
"""Start the main loop of the game"""
if player_color not in ("black", "white"):
print("Invalid color! Color can be black or white")
return
ai_color = "black" if player_color == "white" else "white"
game.print_board(player_color == "white")
if player_color == "white":
game.handle_player_move("white")
while True:
ai_turn = True
while ai_turn:
possible_moves_ai = game.get_possible_moves(ai_color)
if len(possible_moves_ai[0]) == 0:
print(f"Game over, {player_color} wins")
return
_, ai_move = game.alpha_beta(algorithm_depth, (5, 10), ai_color)
game.make_move(*ai_move, ai_color)
print(
"AI's move: "
f"{chr(ord('a')+ai_move[0][0])}{ai_move[0][1]} "
f"{chr(ord('a')+ai_move[1][0])}{ai_move[1][1]}"
)
game.print_board(player_color == "white")
ai_turn = game.get_possible_moves(ai_color)[1] and possible_moves_ai[1]
player_turn = True
while player_turn:
possible_moves_player = game.get_possible_moves(player_color)
if len(possible_moves_player[0]) == 0:
print(f"Game over, {ai_color} wins")
return
game.handle_player_move(player_color)
player_turn = (
game.get_possible_moves(player_color)[1]
and possible_moves_player[1]
)
def ai_turn(self, ai_color, algorithm_depth, possible_moves_ai, print_info):
""" Calculates ai move and makes it """
if len(possible_moves_ai) == 0:
if print_info:
print(f"Game over, {ai_color} loses")
return True
_, ai_move = game.alpha_beta(algorithm_depth, (5, 10), ai_color)
if ai_move is None:
ai_move = possible_moves_ai[0]
game.make_move(*ai_move, ai_color)
if print_info:
print(
"AI's move: "
f"{chr(ord('a')+ai_move[0][0])}{ai_move[0][1]} "
f"{chr(ord('a')+ai_move[1][0])}{ai_move[1][1]}"
)
game.print_board(True)
return False
def auto_game(self, white_depth, black_depth):
"""Auto game mode between two bots"""
game_turn = 0
max_turns = 250
while game_turn < max_turns:
bot_white_turn = True
while bot_white_turn:
possible_moves_ai = game.get_possible_moves("white")
if self.ai_turn("white", white_depth, possible_moves_ai[0], False):
return "white"
bot_white_turn = (
game.get_possible_moves("white")[1] and possible_moves_ai[1]
)
bot_black_turn = True
while bot_black_turn:
possible_moves_ai = game.get_possible_moves("black")
if self.ai_turn("black", black_depth, possible_moves_ai[0], False):
return "black"
bot_black_turn = (
game.get_possible_moves("black")[1] and possible_moves_ai[1]
)
game_turn += 1
if game_turn >= max_turns:
print(f"Game ended after {max_turns} turns!")
return ""
return ""
def auto_simulation(white_depth, black_depth, iterations):
"""Runs iterations amount of simulations"""
print(
f"""Running {iterations} simulations with
white depth = {white_depth},black depth = {black_depth}"""
)
white_wins = 0
black_wins = 0
white_pieces_captured = 0
black_pieces_captured = 0
current_iteration = 0
while current_iteration < iterations:
result = game.auto_game(white_depth, black_depth)
if result == "white":
black_wins += 1
if result == "black":
white_wins += 1
if result == "":
break
white_pieces_captured += 16 - len(game.white_positions)
black_pieces_captured += 16 - len(game.black_positions)
current_iteration += 1
print(
f"""White wins = {white_wins}, Black wins = {black_wins},
white pieces captured in total = {white_pieces_captured},
black pieces captured in total = {black_pieces_captured}"""
)
print()
def print_help():
"""prints help"""
print(
"""python main.py [algorithm_depth] - play the game against the bot as black,
if no algorithm depth is specified the default (5) will be set
python main.py -h --help print this prompt
python main.py -t --test [max_white_depth] [max_black_depth] non interactive
(does not print moves) for testing how different bot depth play against eachother,
if depths are not provided default value of 5 is set
compares heuristic speed and path length
python main.py -w --white [algorithm_depth] play as white pieces,
if no algorithm depth is specified the default (5) will be set
python main.py -b --black [algorithm_depth] play as black pieces,
if no algorithm depth is specified the default (5) will be set
"""
)
def default(color="black", algorithm_depth=5):
"""default program function -> allows to play a game against bot (by default as black)"""
game.start_game(color, algorithm_depth)
# Ran first in the code
if __name__ == "__main__":
game = Game(8)
if len(sys.argv) > 1:
if sys.argv[1] == "-h" or sys.argv[1] == "--help":
print_help()
sys.exit()
if sys.argv[1] == "-t" or sys.argv[1] == "--test":
MAX_WHITE_DEPTH = 4
MAX_BLACK_DEPTH = 4
if len(sys.argv) > 2:
MAX_WHITE_DEPTH = int(sys.argv[2])
if len(sys.argv) > 3:
MAX_BLACK_DEPTH = int(sys.argv[3])
for i in range(MAX_WHITE_DEPTH + 1):
for j in range(MAX_BLACK_DEPTH + 1):
game = Game(8)
auto_simulation(i, j, 10)
sys.exit()
if sys.argv[1] == "-w" or sys.argv[1] == "--white":
ALGORITHM_DEPTH = 5
if len(sys.argv) > 2:
ALGORITHM_DEPTH = int(sys.argv[2])
default("white", ALGORITHM_DEPTH)
sys.exit()
if sys.argv[1] == "-b" or sys.argv[1] == "--black":
ALGORITHM_DEPTH = 5
if len(sys.argv) > 2:
ALGORITHM_DEPTH = int(sys.argv[2])
default("black", ALGORITHM_DEPTH)
sys.exit()
if len(sys.argv) > 1:
default("black", int(sys.argv[1]))
default()

View File

@ -0,0 +1 @@
https://www.overleaf.com/8592159577skmysmsphtkr

View File

@ -0,0 +1,4 @@
{
"cSpell.words": ["rastrigin"],
"python.linting.pylintArgs": ["--generated-members=cv2.*"],
}

View File

@ -0,0 +1,53 @@
import tempfile
import os
import cv2
import numpy as np
import matplotlib.pyplot as plt
def main():
# define number of data points
N = 10
# define the visualization params
colors = np.random.rand(N)
with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as f:
# iterate over the optimization steps
for i in range(10):
# generate random 2D data - replace it with the results from your algorithm
x = np.random.rand(N)
y = np.random.rand(N)
# plot the data
plt.cla()
plt.figure()
plt.scatter(x, y, c=colors, alpha=0.5)
plt.xlim([0, 1])
plt.ylim([0, 1])
plt.savefig(f.name)
# read image
image = cv2.imread(f.name)
# show the image, provide window name first
cv2.imshow('visualization', image)
# add wait key. window waits until user presses a key and quits if the key is 'q'
if cv2.waitKey(0) == 113:
# and finally destroy/close all open windows
cv2.destroyAllWindows()
exit()
try:
f.close()
os.unlink(f.name)
except:
pass
cv2.destroyAllWindows()
if __name__ == '__main__':
main()

View File

@ -0,0 +1,359 @@
"""
Program that optimizes Rastrigin function: file_ (x_point_value, y_point_value) =
20 + (x_point_value^2 - 10cos(2πx)) + (y_point_value^2 - 10 cos(2πy)).
Using Evolutionary Strategy (μ, λ).
"""
import sys
import os
import time
import tempfile
import cv2
import matplotlib.pyplot as plt
import numpy as np
def rastrigin(x_argument, y_argument):
"""Define the Rastrigin function"""
return (
20
+ x_argument**2
- 10 * np.cos(2 * np.pi * x_argument)
+ y_argument**2
- 10 * np.cos(2 * np.pi * y_argument)
)
def generate(
population,
arguments
):
"""Run single generation"""
# Evaluate the fitness of each individual
fitness = np.array(
[
rastrigin(x_point_value, y_point_value)
for x_point_value, y_point_value in population
]
)
# Select the top arguments["number_of_parents"] individuals
parents = population[np.argsort(fitness)[:arguments["number_of_parents"]]]
# Generate the next generation of lambda individuals by recombination
children = np.concatenate(
[
np.random.permutation(parents)
for i in range((arguments["size_of_population"] // arguments["number_of_parents"]) + 1)
]
)
children = children[:arguments["size_of_population"]]
# Add mutation to the children
mutation = np.random.normal(
loc=0, scale=arguments["mutation_strength"], size=(arguments["size_of_population"], 2)
)
population = children + mutation
return fitness, population
def evolution_strategy(
arguments,
no_display=False,
):
"""Define the Evolutionary Strategy (μ, λ) algorithm"""
# Initialize the population
print_info = []
population = np.random.uniform(
low=arguments["min"], high=arguments["max"], size=(arguments["size_of_population"], 2)
)
summary = []
if not no_display:
print_info.append(
(population,
0,
f"""0:nop-{arguments["number_of_parents"]}:sop-{arguments["size_of_population"]}:
ms-{arguments["mutation_strength"]}:nog-{arguments["number_of_generations"]}:
min-max-{arguments["min"], arguments["max"]}:noo-{arguments["number_of_outputs"]}""",
))
arguments["number_of_outputs"] = min(
[arguments["number_of_outputs"] - 1, arguments["number_of_generations"]])
# Iterate until we reach max number of generate and terminate
for generation_number in range(1, arguments["number_of_generations"] + 1):
fitness, population = generate(
population, arguments)
step = (
arguments["number_of_generations"] // arguments["number_of_outputs"]
if arguments["number_of_generations"] % arguments["number_of_outputs"] == 0
else arguments["number_of_generations"] // (arguments["number_of_outputs"] - 1)
)
offset = arguments["number_of_generations"] % step
if (generation_number - offset) % step == 0 and not no_display:
print_info.append(
(population,
generation_number,
f"""{generation_number}:nop_{arguments["number_of_parents"]}:
sop_{arguments["size_of_population"]}:ms_{arguments["mutation_strength"]}:
nog_{arguments["number_of_generations"]}:
min_max_{arguments["min"], arguments["max"]}:
noo_{arguments["number_of_outputs"]}""",
))
summary.append(population)
# Evaluate the fitness of the final population
fitness = np.array(
[
rastrigin(x_point_value, y_point_value)
for x_point_value, y_point_value in population
]
)
# Return the best individual found
best_idx = np.argmin(fitness)
return (
population[best_idx],
fitness[best_idx],
population,
print_info,
summary,
)
def print_help():
"""Print program functionality and how to access it"""
print(
"""
python main.py - Default functionality optimizing
Rastrigin function file_ (x_point_value, y_point_value) =
20 + (x_point_value^2 - 10cos(2πx)) + (y_point_value^2 - 10 cos(2πy))
using Evolutionary Strategy (μ, λ), using only default values
Default values:
arguments["number_of_parents"]=5,
arguments["size_of_population"]=20,
arguments["mutation_strength"]=0.1,
arguments["number_of_generations"]=100,
min_value=-5.12,
max_value=5.12
arguments["number_of_outputs"] = 100
python main.py -h --help print this prompt
Any of the default values an be changed using arguments:
-nop --arguments["number_of_parents"] [number]
-sop --arguments["size_of_population"] [number]
-ms --arguments["mutation_strength"] [number]
-nog --arguments["number_of_generations"] [number]
-min --min_value [number]
-max --max_value [number]
-noo, --arguments["number_of_outputs"] [number]
Those arguments can be given in any order and any argument
which was not entered will be replaced with default value,
Additional flags:
-nd, --no-display (does not show the plots)
-s, --save (if issued WILL save the files)
exemplary use:
python main.py -nop 5 -sop 20 -ms 0.1 -nog 100 -min -5.12 -max 5.12 -noo 100
"""
)
def get_output_bounds(x_data, y_data):
"""Get x and y output limits for pyplot"""
# min_size = 0.2
min_output_size = ARGUMENTS["mutation_strength"] * 10
xmin = min(x_data)
xmax = max(x_data)
ymin = min(y_data)
ymax = max(y_data)
x_diff = xmax - xmin
y_diff = ymax - ymin
if min_output_size is None:
min_output_size = max(x_diff, y_diff)
margin = max(x_diff, y_diff) / 5
if x_diff < min_output_size:
xmax += (min_output_size - x_diff) / 2
xmin -= (min_output_size - x_diff) / 2
if y_diff < min_output_size:
ymax += (min_output_size - y_diff) / 2
ymin -= (min_output_size - y_diff) / 2
x_bounds = [xmin - margin, xmax + margin]
y_bounds = [ymin - margin, ymax + margin]
return x_bounds, y_bounds
def output(
population_output,
generation_number,
file_name="temp",
save_results=False):
"""Draw result of our function"""
# define the visualization params
colors = np.random.rand(len(population_output))
with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as file_:
# iterate over the optimization steps
x_data = []
y_data = []
for x_point_value, y_point_value in population_output:
x_data.append(x_point_value)
y_data.append(y_point_value)
x_lim, y_lim = get_output_bounds(x_data, y_data)
# plot the data
plt.cla()
plt.figure()
plt.scatter(x_data, y_data, c=colors, alpha=0.5)
plt.xlim(x_lim)
plt.ylim(y_lim)
plt.savefig(file_.name)
# read image
image = cv2.imread(file_.name)
# show the image, provide window name first
cv2.imshow(f"Generation {generation_number}", image)
if save_results:
cv2.imwrite(file_name + ".jpg", image)
# add wait key. window waits until user presses a key and quits if
# the key is 'q'
if cv2.waitKey(0) == 113:
# and finally destroy/close all open windows
sys.exit()
cv2.destroyAllWindows()
file_.close()
os.unlink(file_.name)
def print_summary(populations, file_name="temp_summary", save_results=False):
"""Draw result of our function for chosen generations"""
with tempfile.NamedTemporaryFile(suffix=".png", delete=False) as file_:
# iterate over the optimization steps
# generate random 2D data - replace it with the results from your
# algorithm
plt.cla()
plt.figure()
bounds = None
for ind, pop in enumerate(populations):
x_data = []
y_data = []
for x_point_value, y_point_value in pop:
x_data.append(x_point_value)
y_data.append(y_point_value)
if ind == 0:
bounds = get_output_bounds(x_data, y_data)
# plot the data
transparency = ind / (len(populations) - 1)
color = [[transparency, 0, 0]] * len(pop)
plt.scatter(
x_data,
y_data,
c=color,
alpha=transparency,
label=f"{ind}")
plt.xlim(bounds[0])
plt.ylim(bounds[1])
plt.savefig(file_.name)
# read image
image = cv2.imread(file_.name)
if save_results:
cv2.imwrite("SUMMARY:" + file_name + ".jpg", image)
# show the image, provide window name first
cv2.imshow("Summary", image)
# add wait key. window waits until user presses a key and quits if
# the key is 'q'
if cv2.waitKey(0) == 113:
# and finally destroy/close all open windows
sys.exit()
cv2.destroyAllWindows()
file_.close()
os.unlink(file_.name)
def user_input():
"""Handle user terminal arguments"""
arguments = {
"number_of_parents": 5,
"size_of_population": 20,
"mutation_strength": 0.1,
"number_of_generations": 100,
"min": -5.12,
"max": 5.12,
"number_of_outputs": 10,
"no_display": False,
"save": False,
}
for index, argument in enumerate(sys.argv):
if argument in ("-h", "--help"):
print_help()
sys.exit()
if argument in ("-nop", "--number_of_parents"):
arguments["number_of_parents"] = int(sys.argv[index + 1])
if argument in ("-sop", "--size_of_population"):
arguments["size_of_population"] = int(sys.argv[index + 1])
if argument in ("-ms", "--mutation_strength"):
arguments["mutation_strength"] = float(sys.argv[index + 1])
if argument in ("-nog", "--number_of_generations"):
arguments["number_of_generations"] = int(sys.argv[index + 1])
if argument in ("-min", "--min_value"):
arguments["min"] = float(sys.argv[index + 1])
if argument in ("-max", "--max_value"):
arguments["max"] = float(sys.argv[index + 1])
if argument in ("-noo", "--number_of_outputs"):
arguments["number_of_outputs"] = int(sys.argv[index + 1])
if argument in ("-nd", "--no_display"):
arguments["no_display"] = True
if argument in ("-s", "--save"):
arguments["save"] = True
return arguments
def print_output(print_info, save_results, summary):
""" Prints out population and summary plots """
for population, generation_number, file_name in print_info:
output(population, generation_number, file_name, save_results)
summary_file_name = file_name
print_summary(summary, summary_file_name, save_results)
# Ran first in the code
if __name__ == "__main__":
# Run the Evolutionary Strategy algorithm
ARGUMENTS = user_input()
TOTAL_TIME = 0
start_time = time.perf_counter()
(
best_individual,
best_fitness,
output_population,
PRINT_INFO,
SUMMARY,
) = evolution_strategy(
ARGUMENTS,
ARGUMENTS["no_display"],
)
end_time = time.perf_counter()
if not ARGUMENTS["no_display"]:
print_output(PRINT_INFO, ARGUMENTS["save"], SUMMARY)
TOTAL_TIME = end_time - start_time
time_per_generation = TOTAL_TIME / ARGUMENTS["number_of_generations"]
print("Best individual found:", best_individual)
print("Best fitness found:", best_fitness)
print("total_generation_time: ", TOTAL_TIME)
print("time_per_generation: ", time_per_generation)

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -0,0 +1,38 @@
\relax
\providecommand\hyper@newdestlabel[2]{}
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
\global\let\oldnewlabel\newlabel
\gdef\newlabel#1#2{\newlabelxx{#1}#2}
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\ifx\hyper@anchor\@undefined
\let\newlabel\oldnewlabel
\fi}
\fi}
\global\let\hyper@last\relax
\gdef\HyperFirstAtBeginDocument#1{#1}
\providecommand*\HyPL@Entry[1]{}
\HyPL@Entry{0<</S/D>>}
\@writefile{toc}{\contentsline {section}{\numberline {1}Exercise Variant 2 - "Rastrigin function"}{1}{section.1}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {2}Implementation}{1}{section.2}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {1}{\ignorespaces Exemplary plot halfway through generation with parameters nop 250 sop 1000 ms 0.1 nog 500 min max (-5.12, 5.12) noo 10 \relax }}{3}{figure.caption.1}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Exemplary summary plot with parameters nop 250 sop 1000 ms 0.1 nog 500 min max (-5.12, 5.12) noo 10 \relax }}{4}{figure.caption.2}\protected@file@percent }
\@writefile{toc}{\contentsline {section}{\numberline {3}Results}{4}{section.3}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Exemplary generation plots}{4}{subsection.3.1}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces First 10 Generation plots with parameters nop-250:sop-1000:ms-0.1:nog-20:min-max-(-5.12, 5.12):noo-10 \relax }}{6}{figure.caption.3}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(a)}{\ignorespaces {0 generation}}}{6}{subfigure.3.1}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {2 generation}}}{6}{subfigure.3.2}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(c)}{\ignorespaces {4 generation}}}{6}{subfigure.3.3}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(d)}{\ignorespaces {6 generation}}}{6}{subfigure.3.4}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(e)}{\ignorespaces {8 generation}}}{6}{subfigure.3.5}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(f)}{\ignorespaces {10 generation}}}{6}{subfigure.3.6}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Last 10 Generation plots and summary plot with parameters nop-250:sop-1000:ms-0.1:nog-20:min-max-(-5.12, 5.12):noo-10 \relax }}{7}{figure.caption.4}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(a)}{\ignorespaces {12 generation}}}{7}{subfigure.4.1}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(b)}{\ignorespaces {14 generation}}}{7}{subfigure.4.2}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(c)}{\ignorespaces {16 generation}}}{7}{subfigure.4.3}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(d)}{\ignorespaces {18 generation}}}{7}{subfigure.4.4}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(e)}{\ignorespaces {20 generation}}}{7}{subfigure.4.5}\protected@file@percent }
\@writefile{lof}{\contentsline {subfigure}{\numberline{(f)}{\ignorespaces {Summary}}}{7}{subfigure.4.6}\protected@file@percent }
\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Generation time}{8}{subsection.3.2}\protected@file@percent }
\@writefile{lof}{\contentsline {figure}{\numberline {5}{\ignorespaces From left: Parameter changed, New value in place of old parameter value, Best individual found, Best fitness, Total generation time and Time Per Generation [TPG]\relax }}{8}{figure.caption.5}\protected@file@percent }
\gdef \@abspage@last{8}

View File

@ -0,0 +1,94 @@
# Fdb version 4
["xdvipdfmx"] 1684267303 "EARIN_LAB_3_RUDNICKI_KLISZKO.xdv" "EARIN_LAB_3_RUDNICKI_KLISZKO.pdf" "EARIN_LAB_3_RUDNICKI_KLISZKO" 1684267303 0
"EARIN_LAB_3_RUDNICKI_KLISZKO.xdv" 1684267303 67176 23d8825ed244b168acd4ad24fd87aee1 "xelatex"
(generated)
"EARIN_LAB_3_RUDNICKI_KLISZKO.pdf"
(rewritten before read)
["xelatex"] 1684267302 "/home/kuchy/earin/EARIN/lab3/report/EARIN_LAB_3_RUDNICKI_KLISZKO.tex" "EARIN_LAB_3_RUDNICKI_KLISZKO.xdv" "EARIN_LAB_3_RUDNICKI_KLISZKO" 1684267303 0
"/home/kuchy/earin/EARIN/lab3/report/EARIN_LAB_3_RUDNICKI_KLISZKO.tex" 1684267301 8250 17a5f5827aa63a0cacff2b97d7aab966 ""
"/usr/share/texmf-dist/fonts/map/fontname/texfonts.map" 1680514707 3524 cb3e574dea2d1052e39280babc910dc8 ""
"/usr/share/texmf-dist/fonts/tfm/adobe/zapfding/pzdr.tfm" 1680514707 1528 f853c4d1b4e0550255e02831fdc8496f ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm" 1680514707 1524 4414a8315f39513458b80dfc63bff03a ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm" 1680514707 1512 f21f83efb36853c0b70002322c1ab3ad ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm" 1680514707 1520 eccf95517727cb11801f4f1aee3a21b4 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmr12.tfm" 1680514707 1288 655e228510b4c2a1abe905c368440826 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmr6.tfm" 1680514707 1300 b62933e007d01cfd073f79b963c01526 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmr8.tfm" 1680514707 1292 21c1c5bfeaebccffdb478fd231a0997d ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm" 1680514707 1124 6c73e740cf17375f03eec0ee63599741 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm" 1680514707 1116 933a60c408fc0a863a92debe84b2d294 ""
"/usr/share/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1680514707 1120 8b7d695260f3cff42e636090a8002094 ""
"/usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty" 1680514707 24708 5584a51a7101caf7e6bbf1fc27d8f7b1 ""
"/usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty" 1680514707 40635 c40361e206be584d448876bba8a64a3b ""
"/usr/share/texmf-dist/tex/generic/bitset/bitset.sty" 1680514707 33961 6b5c75130e435b2bfdb9f480a09a39f9 ""
"/usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty" 1680514707 7734 b98cbb34c81f667027c1e3ebdbfce34b ""
"/usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty" 1680514707 8371 9d55b8bd010bc717624922fb3477d92e ""
"/usr/share/texmf-dist/tex/generic/iftex/iftex.sty" 1680514707 7237 bdd120a32c8fdb4b433cf9ca2e7cd98a ""
"/usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty" 1680514707 8356 7bbb2c2373aa810be568c29e333da8ed ""
"/usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty" 1680514707 31769 002a487f55041f8e805cfbf6385ffd97 ""
"/usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty" 1680514707 5412 d5a2436094cd7be85769db90f29250a6 ""
"/usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty" 1680514707 17859 4409f8f50cd365c68e684407e5350b1b ""
"/usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty" 1680514707 19007 15924f7228aca6c6d184b115f4baa231 ""
"/usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty" 1680514707 20089 80423eac55aa175305d35b49e04fe23b ""
"/usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty" 1680514707 21514 b7557edcee22835ef6b03ede1802dad4 ""
"/usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty" 1680514707 7008 f92eaa0a3872ed622bbf538217cd2ab7 ""
"/usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty" 1680514707 19336 ce7ae9438967282886b3b036cfad1e4d ""
"/usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty" 1680514707 3935 57aa3c3e203a5c2effb4d2bd2efbc323 ""
"/usr/share/texmf-dist/tex/latex/base/article.cls" 1680514707 20144 d5ecf0a5140c8d8d8b72cbe86e320eff ""
"/usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty" 1680514707 3052 30236f0cc243a8651b82240dfd2e8b9d ""
"/usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty" 1680514707 2462 8ce5f9a9c63002f2c1af03c262cf29af ""
"/usr/share/texmf-dist/tex/latex/base/size10.clo" 1680514707 8448 c33a4e1cb35cee9b33c2b21033b73e39 ""
"/usr/share/texmf-dist/tex/latex/base/ts1cmr.fd" 1680514707 2430 8418b3f1835e588625becbcac4dbce56 ""
"/usr/share/texmf-dist/tex/latex/caption/caption.sty" 1680514707 55778 14d5c99aa26410e440820bb9ea5b8b3a ""
"/usr/share/texmf-dist/tex/latex/caption/caption3.sty" 1680514707 71836 1a735454ad10692452eb2f2fc37f3865 ""
"/usr/share/texmf-dist/tex/latex/float/float.sty" 1680514707 6749 16d2656a1984957e674b149555f1ea1d ""
"/usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg" 1680514707 1224 978390e9c2234eab29404bc21b268d1e ""
"/usr/share/texmf-dist/tex/latex/graphics-def/xetex.def" 1680514707 14788 1dde73f396dd97d88c838bee2a352abe ""
"/usr/share/texmf-dist/tex/latex/graphics/graphics.sty" 1680514707 18387 8f900a490197ebaf93c02ae9476d4b09 ""
"/usr/share/texmf-dist/tex/latex/graphics/graphicx.sty" 1680514707 8010 a8d949cbdbc5c983593827c9eec252e1 ""
"/usr/share/texmf-dist/tex/latex/graphics/keyval.sty" 1680514707 2671 7e67d78d9b88c845599a85b2d41f2e39 ""
"/usr/share/texmf-dist/tex/latex/graphics/trig.sty" 1680514707 4023 293ea1c16429fc0c4cf605f4da1791a9 ""
"/usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty" 1680514707 17914 4c28a13fc3d975e6e81c9bea1d697276 ""
"/usr/share/texmf-dist/tex/latex/hyperref/hxetex.def" 1680514707 44472 a079d09fb6a7034a730c6d56a4fe1267 ""
"/usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty" 1680514707 223129 4edf043af471f3251c66e432cfa22987 ""
"/usr/share/texmf-dist/tex/latex/hyperref/nameref.sty" 1680514707 12947 1ce831528e963a8568de1f4d67cfb982 ""
"/usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def" 1680514707 14249 d947c5c09f3af04ae2f37fc11c7ac2f6 ""
"/usr/share/texmf-dist/tex/latex/hyperref/puenc.def" 1680514707 117125 aa115cac3914abcf3769f370e6325117 ""
"/usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty" 1680514707 22555 6d8e155cfef6d82c3d5c742fea7c992e ""
"/usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty" 1680514707 13815 760b0c02f691ea230f5359c4e1de23a7 ""
"/usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def" 1680514707 32346 879686206fa618f4f5073ad4bd48feda ""
"/usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty" 1680514707 5766 13a9e8766c47f30327caf893ece86ac8 ""
"/usr/share/texmf-dist/tex/latex/listings/listings.cfg" 1680514707 1829 d8258b7d94f5f955e70c623e525f9f45 ""
"/usr/share/texmf-dist/tex/latex/listings/listings.sty" 1680514707 80947 75a96bb4c9f40ae31d54a01d924df2ff ""
"/usr/share/texmf-dist/tex/latex/listings/lstlang1.sty" 1680514707 205154 31132370016e8c97e49bc3862419679b ""
"/usr/share/texmf-dist/tex/latex/listings/lstmisc.sty" 1680514707 77021 d05e9115c67855816136d82929db8892 ""
"/usr/share/texmf-dist/tex/latex/refcount/refcount.sty" 1680514707 9878 9e94e8fa600d95f9c7731bb21dfb67a4 ""
"/usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty" 1680514707 9714 ba3194bd52c8499b3f1e3eb91d409670 ""
"/usr/share/texmf-dist/tex/latex/subfig/subfig.sty" 1680514707 21369 9ef165ca6df8815c92e693146a376c92 ""
"/usr/share/texmf-dist/tex/latex/tools/array.sty" 1680514707 12691 5b542990fe866f3d772f71346cf85b95 ""
"/usr/share/texmf-dist/tex/latex/tools/tabularx.sty" 1680514707 7147 be6981d9f5d866a5634048c4a11814a9 ""
"/usr/share/texmf-dist/tex/latex/url/url.sty" 1680514707 12796 8edb7d69a20b857904dd0ea757c14ec9 ""
"/usr/share/texmf-dist/web2c/texmf.cnf" 1680514707 39911 2da6c67557ec033436fe5418a70a8a61 ""
"/var/lib/texmf/web2c/xetex/xelatex.fmt" 1681763698 11046108 24dffefc9850ac1939834d68c95379b0 ""
"0.jpg" 1684253438 87686 fdcc70f185e7fed1e054614ef7fd1d99 ""
"10.jpg" 1684253438 35289 05feeebd2669a1eaadd76cf24fefdaf5 ""
"12.jpg" 1684253438 31816 a9ed363592906d46ee5b6515a4c92003 ""
"14.jpg" 1684253438 42591 e56cb908db6f8c390fa15bd606b8e7e8 ""
"16.jpg" 1684253438 43391 433aaa137393f985e8e0ad5934b67c0f ""
"18.jpg" 1684253438 44235 8b8f1cd83e131e04baf0ec8f709477d7 ""
"2.jpg" 1684253438 51403 23f3872e85e47a182ec5801160a0bad7 ""
"20.jpg" 1684253438 43506 5da10c8bdf661be5d929ed99ca44dd22 ""
"4.jpg" 1684253438 39503 aa9b71e017c328011badbe7e6738a6d5 ""
"6.jpg" 1684253438 45028 5dc52477f526227db313fc589bb9c108 ""
"8.jpg" 1684253438 40633 34cc6363dd361341ebb04deff63f6dd2 ""
"EARIN_LAB_3_RUDNICKI_KLISZKO.aux" 1684267303 3970 d4ecd53a0c4324bd85e9464a9bb1ff0b "xelatex"
"EARIN_LAB_3_RUDNICKI_KLISZKO.out" 1684267303 782 eff6be67cb51513b5721bb14fb2103ca "xelatex"
"EARIN_LAB_3_RUDNICKI_KLISZKO.tex" 1684267301 8250 17a5f5827aa63a0cacff2b97d7aab966 ""
"example_halfway.jpg" 1684253438 43787 f0809821c60091352d61146053f795f2 ""
"example_summary.jpg" 1684253438 17901 286cc778e6a6b564c8027d51b98a968f ""
"summary.jpg" 1684253438 25294 025e44a37ad32dc1d16a583d04349a03 ""
(generated)
"EARIN_LAB_3_RUDNICKI_KLISZKO.aux"
"EARIN_LAB_3_RUDNICKI_KLISZKO.log"
"EARIN_LAB_3_RUDNICKI_KLISZKO.out"
"EARIN_LAB_3_RUDNICKI_KLISZKO.xdv"
(rewritten before read)

View File

@ -0,0 +1,577 @@
PWD /home/kuchy/earin/EARIN/lab3/report
INPUT /usr/share/texmf-dist/web2c/texmf.cnf
INPUT /var/lib/texmf/web2c/xetex/xelatex.fmt
INPUT /home/kuchy/earin/EARIN/lab3/report/EARIN_LAB_3_RUDNICKI_KLISZKO.tex
OUTPUT EARIN_LAB_3_RUDNICKI_KLISZKO.log
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/article.cls
INPUT /usr/share/texmf-dist/tex/latex/base/size10.clo
INPUT /usr/share/texmf-dist/tex/latex/base/size10.clo
INPUT /usr/share/texmf-dist/tex/latex/base/size10.clo
INPUT /usr/share/texmf-dist/tex/latex/base/size10.clo
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphicx.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/graphics.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/trig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
INPUT /usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
INPUT /usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
INPUT /usr/share/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
INPUT /usr/share/texmf-dist/tex/latex/graphics-def/xetex.def
INPUT /usr/share/texmf-dist/tex/latex/graphics-def/xetex.def
INPUT /usr/share/texmf-dist/tex/latex/graphics-def/xetex.def
INPUT /usr/share/texmf-dist/tex/latex/graphics-def/xetex.def
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstmisc.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstmisc.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstmisc.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstmisc.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.cfg
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.cfg
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.cfg
INPUT /usr/share/texmf-dist/tex/latex/listings/listings.cfg
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hyperref.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/kvdefinekeys/kvdefinekeys.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/hycolor/hycolor.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/letltxmacro/letltxmacro.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/auxhook/auxhook.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/nameref.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/latex/refcount/refcount.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/generic/gettitlestring/gettitlestring.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/latex/kvsetkeys/kvsetkeys.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def
INPUT /usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def
INPUT /usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def
INPUT /usr/share/texmf-dist/tex/latex/hyperref/pd1enc.def
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/etexcmds/etexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/iftex/iftex.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/puenc.def
INPUT /usr/share/texmf-dist/tex/latex/hyperref/puenc.def
INPUT /usr/share/texmf-dist/tex/latex/hyperref/puenc.def
INPUT /usr/share/texmf-dist/tex/latex/hyperref/puenc.def
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/tex/latex/url/url.sty
INPUT /usr/share/texmf-dist/fonts/map/fontname/texfonts.map
INPUT /usr/share/texmf-dist/fonts/tfm/adobe/zapfding/pzdr.tfm
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/bitset/bitset.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/intcalc/intcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty
INPUT /usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty
INPUT /usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty
INPUT /usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty
INPUT /usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty
INPUT /usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty
INPUT /usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty
INPUT /usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty
INPUT /usr/share/texmf-dist/tex/generic/atbegshi/atbegshi.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atbegshi-ltx.sty
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hxetex.def
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hxetex.def
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hxetex.def
INPUT /usr/share/texmf-dist/tex/latex/hyperref/hxetex.def
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/stringenc/stringenc.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/ltxcmds/ltxcmds.sty
INPUT /usr/share/texmf-dist/tex/generic/pdfescape/pdfescape.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/rerunfilecheck/rerunfilecheck.sty
INPUT /usr/share/texmf-dist/tex/latex/kvoptions/kvoptions.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/generic/pdftexcmds/pdftexcmds.sty
INPUT /usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty
INPUT /usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty
INPUT /usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty
INPUT /usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty
INPUT /usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty
INPUT /usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty
INPUT /usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty
INPUT /usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty
INPUT /usr/share/texmf-dist/tex/latex/atveryend/atveryend.sty
INPUT /usr/share/texmf-dist/tex/latex/base/atveryend-ltx.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/uniquecounter/uniquecounter.sty
INPUT /usr/share/texmf-dist/tex/generic/bigintcalc/bigintcalc.sty
INPUT /usr/share/texmf-dist/tex/generic/infwarerr/infwarerr.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/tabularx.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/tools/array.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/float/float.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/subfig/subfig.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/caption/caption3.sty
INPUT /usr/share/texmf-dist/tex/latex/graphics/keyval.sty
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT /usr/share/texmf-dist/tex/latex/l3backend/l3backend-xetex.def
INPUT ./EARIN_LAB_3_RUDNICKI_KLISZKO.aux
INPUT EARIN_LAB_3_RUDNICKI_KLISZKO.aux
INPUT EARIN_LAB_3_RUDNICKI_KLISZKO.aux
OUTPUT EARIN_LAB_3_RUDNICKI_KLISZKO.aux
INPUT /usr/share/texmf-dist/tex/latex/base/ts1cmr.fd
INPUT /usr/share/texmf-dist/tex/latex/base/ts1cmr.fd
INPUT /usr/share/texmf-dist/tex/latex/base/ts1cmr.fd
INPUT /usr/share/texmf-dist/tex/latex/base/ts1cmr.fd
INPUT ./EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT ./EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT ./EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT ./EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT ./EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT ./EARIN_LAB_3_RUDNICKI_KLISZKO.out
OUTPUT EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmr12.tfm
INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmr8.tfm
INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmr6.tfm
INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm
INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm
INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm
INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm
INPUT /usr/share/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm
INPUT /usr/share/texmf-dist/tex/latex/listings/lstlang1.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstlang1.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstlang1.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstlang1.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstlang1.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstlang1.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstlang1.sty
INPUT /usr/share/texmf-dist/tex/latex/listings/lstlang1.sty
OUTPUT EARIN_LAB_3_RUDNICKI_KLISZKO.xdv
INPUT ./example_halfway.jpg
INPUT ./example_halfway.jpg
INPUT example_halfway.jpg
INPUT ./example_summary.jpg
INPUT ./example_summary.jpg
INPUT example_summary.jpg
INPUT ./0.jpg
INPUT ./0.jpg
INPUT 0.jpg
INPUT ./2.jpg
INPUT ./2.jpg
INPUT 2.jpg
INPUT ./4.jpg
INPUT ./4.jpg
INPUT 4.jpg
INPUT ./6.jpg
INPUT ./6.jpg
INPUT 6.jpg
INPUT ./8.jpg
INPUT ./8.jpg
INPUT 8.jpg
INPUT ./10.jpg
INPUT ./10.jpg
INPUT 10.jpg
INPUT ./12.jpg
INPUT ./12.jpg
INPUT 12.jpg
INPUT ./14.jpg
INPUT ./14.jpg
INPUT 14.jpg
INPUT ./16.jpg
INPUT ./16.jpg
INPUT 16.jpg
INPUT ./18.jpg
INPUT ./18.jpg
INPUT 18.jpg
INPUT ./20.jpg
INPUT ./20.jpg
INPUT 20.jpg
INPUT ./summary.jpg
INPUT ./summary.jpg
INPUT summary.jpg
INPUT EARIN_LAB_3_RUDNICKI_KLISZKO.aux
INPUT ./EARIN_LAB_3_RUDNICKI_KLISZKO.out
INPUT ./EARIN_LAB_3_RUDNICKI_KLISZKO.out

View File

@ -0,0 +1,5 @@
\BOOKMARK [1][-]{section.1}{\376\377\000E\000x\000e\000r\000c\000i\000s\000e\000\040\000V\000a\000r\000i\000a\000n\000t\000\040\0002\000\040\000-\000\040\000"\000R\000a\000s\000t\000r\000i\000g\000i\000n\000\040\000f\000u\000n\000c\000t\000i\000o\000n\000"}{}% 1
\BOOKMARK [1][-]{section.2}{\376\377\000I\000m\000p\000l\000e\000m\000e\000n\000t\000a\000t\000i\000o\000n}{}% 2
\BOOKMARK [1][-]{section.3}{\376\377\000R\000e\000s\000u\000l\000t\000s}{}% 3
\BOOKMARK [2][-]{subsection.3.1}{\376\377\000E\000x\000e\000m\000p\000l\000a\000r\000y\000\040\000g\000e\000n\000e\000r\000a\000t\000i\000o\000n\000\040\000p\000l\000o\000t\000s}{section.3}% 4
\BOOKMARK [2][-]{subsection.3.2}{\376\377\000G\000e\000n\000e\000r\000a\000t\000i\000o\000n\000\040\000t\000i\000m\000e}{section.3}% 5

View File

@ -0,0 +1,173 @@
\documentclass{article}[12pt]
\usepackage{graphicx} % Required for inserting images
\usepackage{listings}
\usepackage{hyperref}
\usepackage{tabularx}
\usepackage{float}
\usepackage{subfig}
\title{EARIN Lab 3 Report}
\author{Krzysztof Rudnicki, 307585 \\ Jakub Kliszko, 303866 }
\date{\today}
\begin{document}
\maketitle
\section{Exercise Variant 2 - "Rastrigin function"}
Our task was to write a program that optimizes Rastrigin function: \\
\[ f (x, y) =
20 + (x^2 - 10 \, cos(2πx)) + (y^2 - 10 \, cos(2πy)) \]
Using Evolutionary Strategy ($\mu$, $\lambda$) (later refered as ES($\mu$, $\lambda$)) \\
\section{Implementation}
Program can be ran by installing python, moving to project directory and issuing command:
\begin{lstlisting}[language=bash]
python main.py
\end{lstlisting}
There are 7 parameters we can (but do not have to) change:
\begin{enumerate}
\item Number of parents (default equal to 5)
\item Size of population (default equal to 20)
\item Mutation Strength (default equal to 0.1)
\item Number of generations (default equal to 100)
\item Minimal Value (default equal to -5.12)
\item Maximal Value (default equal to 5.12)
\item Number of outputs (default equal to 10)
\end{enumerate}
Number of outputs are strictly for displaying results and does not influence the result itself \\
To set parameters values user can add those flags to program run:
\begin{lstlisting}[language=bash]
-nop --number_of_parents [number]
-sop --size_of_population [number]
-ms --mutation_strength [number]
-nog --number_of_generations [number]
-min --min_value [number]
-max --max_value [number]
-noo --number_of_outputs [number]
\end{lstlisting}
Order of those parameters does not matter, user can provide none, one, or any number of arguments \\
Exemplary use (settings all values to default values):
\begin{lstlisting}[language=bash]
python main.py -nop 5 -sop 20 -s 0.1
-i 100 -min -5.12 -max 5.12 -noo 10
\end{lstlisting}
There are additional flags for quality of life with the program
\begin{lstlisting}
-nd --no_display (If used will NOT print out the plots)
-s --save (If used WILL save plot files to code folder)
\end{lstlisting}
To print help info about program user can issue help flag:
\begin{lstlisting}[language=bash]
python main.py -h
\end{lstlisting}
Results will be displayed on 2D scatter plot. There will be as many outputs as user wanted with incrementation of generation so that the final plot will be on final generation \\
\begin{figure}[H]
\caption{Exemplary plot halfway through generation with parameters \\ nop 250 sop 1000 ms 0.1 nog 500 min max (-5.12, 5.12) noo 10 }
\includegraphics[width=\textwidth]{example_halfway.jpg}
\centering
\end{figure}
At the end summary of results on plot will display with red gradient showing results from the earliest (white) to latest (bright red) \\
\begin{figure}[H]
\caption{Exemplary summary plot with parameters\\ nop 250 sop 1000 ms 0.1 nog 500 min max (-5.12, 5.12) noo 10 }
\includegraphics[width=\textwidth]{example_summary.jpg}
\centering
\end{figure}
Results will be displayed and if user requested saved in the same folder as code directory for further inspection, with file name containing information about input parameters \\
4 more information will also be displayed:
\begin{itemize}
\item Best individual found - x, y coordinates closest to 0
\item Best fitness found
\item Total Generation Time - including ONLY generation (not plot display)
\item Time per generation - Total generation time divided by number of generations
\end{itemize}
\section{Results}
\subsection{Exemplary generation plots}
We have successfully implemented ES($\mu$, $\lambda$) to optimize Rastrigin function \\
Rastrigin function is used to test optimization algorithms as it contains a lot of local minima, our plots should therefore tend to contain values closer and closer to zeros \\
Exemplary run of the program with parameters:
\begin{itemize}
\item Number of parents - 250
\item Size of population - 1000
\item Mutation Strength - 0.1
\item Number of generations - 20
\item Min value - -5.12
\item Max value - 5.12
\item Number of outputs - 10
\end{itemize}
\begin{figure}[H]
\advance\leftskip-3cm
\begin{tabular}{cc}
\subfloat[0 generation]{
\includegraphics[width = 0.7\textwidth]{0.jpg}} &
\subfloat[2 generation]{
\includegraphics[width = 0.7\textwidth]{2.jpg}} \\
\subfloat[4 generation]{
\includegraphics[width = 0.7\textwidth]{4.jpg}} &
\subfloat[6 generation]{
\includegraphics[width = 0.7\textwidth]{6.jpg}} \\
\subfloat[8 generation]{
\includegraphics[width = 0.7\textwidth]{8.jpg}} &
\subfloat[10 generation]{
\includegraphics[width = 0.7\textwidth]{10.jpg}} \\
\end{tabular}
\caption{First 10 Generation plots with parameters nop-250:sop-1000:ms-0.1:nog-20:min-max-(-5.12, 5.12):noo-10 }
\end{figure}
\begin{figure}[H]
\advance\leftskip-3cm
\begin{tabular}{cc}
\subfloat[12 generation]{
\includegraphics[width = 0.7\textwidth]{12.jpg}} &
\subfloat[14 generation]{
\includegraphics[width = 0.7\textwidth]{14.jpg}} \\
\subfloat[16 generation]{
\includegraphics[width = 0.7\textwidth]{16.jpg}} &
\subfloat[18 generation]{
\includegraphics[width = 0.7\textwidth]{18.jpg}} \\
\subfloat[20 generation]{
\includegraphics[width = 0.7\textwidth]{20.jpg}} &
\subfloat[Summary]{
\includegraphics[width = 0.7\textwidth]{summary.jpg}} \\
\end{tabular}
\caption{Last 10 Generation plots and summary plot with parameters nop-250:sop-1000:ms-0.1:nog-20:min-max-(-5.12, 5.12):noo-10 }
\end{figure}
As we can see with every generation the result comes closer and closer to the center of the plot (point (0, 0)) \\ At the begining (0 generation) we have random points with coordinates between -5.12 and 5.12 \\ Which later form groups of points with center group becoming bigger and bigger (generations between 2 and 12) \\ To finallly reach one big group centered around (0, 0) (generations between 14 and 20) \\ Summary plot clearly shows that the final groups (once that most red) are close to point (0, 0) \\
Additonal info from execution of the program with those parameters:
\begin{itemize}
\item Best individual found: [-0.00512557 -0.00185114]
\item Best fitness found: 0.005891436754870583
\item Total generation time: 0.0532705290006561
\item Time per generation: 0.0026635264500328047
\end{itemize}
\subsection{Generation time}
We have also decided to change parameters of generations and see how they affect generation time \\
First we ran program with default parameters and then changed each of it separately, results can be found in the table below \\
\begin{figure}[H]
\caption{From left: Parameter changed, New value in place of old parameter value, Best individual found, Best fitness, Total generation time and Time Per Generation [TPG]}
\begin{tabular}{| c | c | c | c | c | c |}
\hline
Parameter & New Value & Individual (x, y) & Fitness & Total Time [ms] & TPG [ms] \\
\hline
None & x & $\approx$ [-1.98e0, 1.03e0] & $\approx$ 5.32e0 & $\approx$ 7.123e-3 & $\approx$ 7.123e-05 \\
\hline
Parents Number & 1000 & $\approx$ [-4.51e-4 -5.88e-3] & $\approx$ 6.91e-3 & $\approx$ 2.689e-1 & $\approx$ 2.689e-3 \\
\hline
Population Size & 4000 & $\approx$ [7.16e-4, 2.77e-3] & $\approx$ 1.63e-3 & $\approx$ 1.0526e0 & $\approx$ 1.052e-2 \\
\hline
Mutation Strength & 20 & $\approx$ [5.73e0, 5.76e0] & $\approx$ 8.58e1 & $\approx$ 6.890e-3 & $\approx$ 6.890e-5 \\
\hline
MinMax value & [-1024, 1024] & $\approx$ [-2.84e2, 2.00e2] & $\approx$ 1.21e5 & $\approx$ 7.412e-3 & $\approx$ 7.412e-5 \\
\hline
Generations Number & 20000 & $\approx$ [-1.01e0, 9.48e-1] & $\approx$ 2.46e0 & $\approx$ 1.409e0 & $\approx$ 7.048e-5 \\
\hline
\end{tabular}
\end{figure}
As we can see the most calculation intensive parameters are number of generations and population size, then parents number. \\ Changing Mutation Strength and MinMax value does not influence generation time much
\end{document}

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,112 @@
"""
Program that predicts wine quality based on variant2.csv data
"""
import pandas as pd
import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_squared_error, accuracy_score, f1_score
from sklearn.linear_model import LogisticRegression
class LinearRegression:
"""Implements Linear regression method"""
def __init__(self):
self.theta = None
def fit(self, x_values, y_values):
"""
Fit linear regression model to our training data
"""
# Add a column of ones to X for the intercept term
x_values = np.concatenate((np.ones((x_values.shape[0], 1)), y_values), axis=1)
# Compute the least squares solution using the normal equation
self.theta = (
np.linalg.inv(x_values.T.dot(x_values)).dot(x_values.T).dot(y_values)
)
def predict(self, x_values):
"""
Predict target values for our input data using the trained linear regression model.
"""
# Add a column of ones to X for the intercept term
x_values = np.concatenate((np.ones((x_values.shape[0], 1)), x_values), axis=1)
# Make predictions using the learned weights
y_predicted = x_values.dot(self.theta)
return y_predicted
def score(self, x_values, y_values):
"""
Compute the R-squared score of the linear regression model on our test data.
"""
y_predicted = self.predict(x_values)
ss_res = np.sum((y_values - y_predicted) ** 2)
ss_tot = np.sum((y_values - np.mean(y_values)) ** 2)
r2_score = 1 - (ss_res / ss_tot)
return r2_score
wine_df = pd.read_csv("variant2.csv")
wine_df.head()
wine_df.describe()
wine_df.info()
X = wine_df.iloc[:, :-1].values
y = wine_df.iloc[:, -1].values
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=0)
scaler = StandardScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.transform(X_test)
regressor = LinearRegression()
regressor.fit(X_train, y_train)
y_pred = regressor.predict(X_test)
mse = mean_squared_error(y_test, y_pred)
print("MSE:", mse)
classifier = LogisticRegression()
classifier.fit(X_train, y_train)
y_pred = classifier.predict(X_test)
accuracy = accuracy_score(y_test, y_pred)
print("Accuracy:", accuracy)
y_pred_train = regressor.predict(X_train)
train_mse = mean_squared_error(y_train, y_pred_train)
print("Training MSE:", train_mse)
train_r_squared = regressor.score(X_train, y_train)
print("Training R^2:", train_r_squared)
test_r_squared = regressor.score(X_test, y_test)
print("Testing R^2:", test_r_squared)
y_pred_train = classifier.predict(X_train)
train_accuracy = accuracy_score(y_train, y_pred_train)
print("Training Accuracy:", train_accuracy)
train_f1_score = f1_score(y_train, y_pred_train, average="weighted")
print("Training F1 Score:", train_f1_score)
test_f1_score = f1_score(y_test, y_pred, average="weighted")
print("Testing F1 Score:", test_f1_score)
Data1 = sns.countplot(x="quality", data=wine_df)
plt.draw()
plt.waitforbuttonpress(0)
plt.close()
Data2 = sns.heatmap(wine_df.corr(), annot=True)
plt.draw()
plt.waitforbuttonpress(0)
plt.close()

View File

@ -0,0 +1,87 @@
\documentclass{article}[12pt]
\usepackage{graphicx} % Required for inserting images
\usepackage{listings}
\usepackage{hyperref}
\usepackage{tabularx}
\usepackage{float}
\usepackage{subfig}
\usepackage[a4paper, total={6in, 8in}]{geometry}
\title{EARIN Lab 3 Report}
\author{Krzysztof Rudnicki, 307585 \\ Jakub Kliszko, 303866 }
\date{\today}
\begin{document}
\maketitle
\section{Exercise Variant 2 - Predicting wine quality}
Our task was to write a program that predicts wine quality based on data containing: \\
fixed acidity,volatile acidity,citric acid,residual sugar,chlorides,free sulfur dioxide,total sulfur dioxide,density,pH,sulphates,alcohol,quality
\section{Implementation}
Program can be ran by installing python, moving to project directory and issuing command:
\begin{lstlisting}[language=bash]
python main.py
\end{lstlisting}
We have decided on implementing Linear and Logistical regression methods as we found them the easiest to implement \\
There will be 3 types of output \\
\begin{enumerate}
\item Number of wines with given quality (Graphical)
\item How a given parameter impacts quality (Graphical)
\item How well did linear and logistical regression performed (Textual)
\end{enumerate}
Upon clicking any button the next plot will be shown
\section{Results}
We have successfully implemented program to predict wine quality \\
\subsection{Data investigation}
There are 11 features in total and 1599 instances of those features \\
It is clear that there is an inbalance in quality of wines with majority of wines being either '5' or '6':
\begin{figure}[H]
\caption{Plot showing inbalance in quality of wine}
\includegraphics[width=\textwidth]{inbalance.png}
\centering
\end{figure}
More importantly we checked correlation of parameters:
\begin{figure}[H]
\caption{Plot showing correlation between parameters, bright squares are positve correleation, dark squares are negative correleation}
\includegraphics[width=\textwidth]{corr.png}
\centering
\end{figure}
Bright squares mean that the parameters have positive correlation to each other \\
Darker squares mean that the parameters have negative correlation to each other \\
\newpage
We are most intrested in correleation of certain parameters to quality value \\
Alcohol has by far the biggest positive impact on quality with coreleation value of 0.48 (where value of 1 means that those two parameters are equal to eachother), then we have sulphates and citric acid with roughly the same values (0.25 and 0.23 respectively) \\
The worst impact on quality is done by volatile acidity (-0.39)
\subsection{Methods comparison}
For Linear regression we checked values of:
\begin{itemize}
\item Training Mean squared error - Difference between predicted and true values, the lower the better
\item Training $R^2$ - for given data, The higher the better
\item Testing $R^2$ - for new data, The higher the better
\end{itemize}
For Logistic regression we checked values of:
\begin{itemize}
\item Training Accuracy - how many instances we correctly classified, the higher the better
\item Training F1 Score - for given data, The higher the better
\item Testing F1 Score - for new data, The higher the better
\end{itemize}
For Linear regression we received values:
\begin{lstlisting}[language=bash]
Training MSE: 0.4258083784387745
Training R^2: 0.3654519616206865
Testing R^2: 0.32838876395802263
\end{lstlisting}
For Logistic regression we received values:
\begin{lstlisting}[language=bash]
Training Accuracy: 0.596559812353401
Training F1 Score: 0.5806169210603433
Testing F1 Score: 0.6166756344362352
\end{lstlisting}
We can see that Logistic regression outperforms linear regression, its test scores which is supposed to be as high as possible are twice as good as ones in linear regression
\end{document}

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because it is too large Load Diff

1
Programming/EARIN/lab5/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
data/

View File

@ -0,0 +1,9 @@
[TYPECHECK]
# List of members which are set dynamically and missed by Pylint inference
# system, and so shouldn't trigger E1101 when accessed. (Module 'torch' has no 'max' member)
generated-members=numpy.*, torch.*
[DESIGN]
# Maximum number of statements in function / method body
max-statements=16

View File

@ -0,0 +1,120 @@
# numpy for loading dataset
import numpy as np
# pytorch for deep learning models
import torch
# nn like neural network
import torch.nn as nn
import torch.optim as optim
# Pima indians describes patient medical data and whether they had diabetes for last 5 years
# It is binary classification (they could either have diabetes 1 or not 0)
# load the file as a matrix of numbers,
dataset = np.loadtxt('pima-indians-diabetes.csv', delimiter=',')
input_columns = 8
# split into input (X) -> in this case everything beside info whether patient had diabetes or not is input
# We are splitting data into two subsets by using NumPy slice operator : and choose first 8 columns using 0:8 slice
X = dataset[:,0:input_columns]
# and output (y) variables -> in this case we are only interested whether patient had diabetes or not as an output
# you can simplify that y = f(X)
# We are splitting the data by using slice operator : and choosing last column
y = dataset[:,input_columns]
# we need to convert this data to pytorch tensors
# Pytorch usually operates on 32-bit floating point and NumPy by default uses 64 bit floating point
X = torch.tensor(X, dtype=torch.float32)
# We can also correct the shape to fit what PyTorch would expect (here we are converting n vectors to n x 1 matrix)
# This simplifies handling matrix multiplication operations (which are the basis of deep learning models)
# reshape is converting the output variable y from a 1-dimensional NumPy array to a 2-dimensional PyTorch tensor with a shape of (n, 1), where n is the number of samples in the dataset.
y = torch.tensor(y, dtype=torch.float32).reshape(-1, 1)
# define the model
# this class is a subclass of nn.Module -> base class provided by PyTorch for building neural network models.
class PimaClassifier(nn.Module):
def __init__(self):
super().__init__()
# There are 3 (fully connected) layers in class, each with their activation function
# creates Linear layer, it maps input to a hidden layer of 12 neurons
# input features have a size of 8 (same number as number of features in pima indians diabetes dataset)
first_output_neurons = 12
self.hidden1 = nn.Linear(input_columns, first_output_neurons)
# This creates ReLU (rectified linear unit) activation function applied after first hidden layer
self.act1 = nn.ReLU()
# This maps the output of first layer (which was 12 neurons) to new hidden layer of 8 neurons
second_output_neurons = 8
self.hidden2 = nn.Linear(first_output_neurons, second_output_neurons)
# ReLU activation function applied after second hidden layer
self.act2 = nn.ReLU()
# We map output of second layer to a single output neuron -> which will represent the predicted
# probability of a sample having diabetes
self.output = nn.Linear(second_output_neurons, 1)
# sigmoid function forces output to be either 0 or 1
self.act_output = nn.Sigmoid()
# forward pass is computation of output based on input 'x'
def forward(self, x):
# Applies first hidden layer (and then ReLU activation) to input x
x = self.act1(self.hidden1(x))
# Applies second hidden layer (and then ReLU activation) to input x
x = self.act2(self.hidden2(x))
# Applies output layer (and then Sigmoid activation) to input x
x = self.act_output(self.output(x))
# returns final output (0 or 1)
return x
# Create object from model class
model = PimaClassifier()
print(model)
# train the model
# first we need to specify what is the goal of training
# we have input X and output y and we want the model to be as close to y as possible
# Since this is binary classification problem we will use "binary cross entropy" to measure the distance between
# our prediction and y
loss_fn = nn.BCELoss() # binary cross entropy
# Optimizer adjust model weights to produce better output
# Its described as being able to tune itself to a lot of problems
# inputs are:
# parameters which it will optimize (from the model)
# and lr (learning rate) which is step size of each iteration
optimizer = optim.Adam(model.parameters(), lr=0.001)
# epoch is the entire training dataset passed to a model once
n_epochs = 100
# batch is one or more sample passed to model
# number of epochs and the size of a batch can be chosen experimentally by trial and error.
# a lot of epochs and big size of batch means more time and more memory consumption but more accurate results
batch_size = 10
# We split dataset into batches and pass batches one by one into a model to training loop
# after using all batches we finish one epoch and can start over again to refine the model
# we use two nested for loops for training, one is for epochs
for epoch in range(n_epochs):
# and one for batches
for i in range(0, len(X), batch_size):
# Split X data into a batch with the size from batch_size
Xbatch = X[i:i+batch_size]
# run the model on the batch and return "batched" output
y_pred = model(Xbatch)
# Split y data into a batch with the size from batch_size
ybatch = y[i:i+batch_size]
# Compare loss
loss = loss_fn(y_pred, ybatch)
# optimize model
optimizer.zero_grad()
# calculate the inaccuracy
loss.backward()
# optimizer takes next step
optimizer.step()
# compute final accuracy
y_pred = model(X)
accuracy = (y_pred.round() == y).float().mean()
print(f"Accuracy {accuracy}")
# make class predictions with the model
predictions = (model(X) > 0.5).int()
for i in range(5):
print('%s => %d (expected %d)' % (X[i].tolist(), predictions[i], y[i]))

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -0,0 +1,310 @@
""" Implementation of a network analyzing MNIST dataset """
import torch
from torch import nn
from torch import optim
from torchvision import datasets, transforms
import matplotlib.pyplot as plt
import time
def set_hyperparameters():
""" sets hyperparameters used throughout the network """
return {
"num_epochs": 5,
"init_input_size": 28 * 28, # MNIST images are 28x28 pixels
"num_classes": 10,
}
def load_datasets():
""" Loads train and test dataset from MNIST """
train_dataset = datasets.MNIST(
root="./data", train=True, transform=transforms.ToTensor(), download=True
)
test_dataset = datasets.MNIST(
root="./data", train=False, transform=transforms.ToTensor(), download=True
)
return train_dataset, test_dataset
def create_data_loaders(train_dataset, test_dataset):
""" Create train and test data loaders """
train_loader = torch.utils.data.DataLoader(
dataset=train_dataset, batch_size=BATCH_SIZE, shuffle=True
)
test_loader = torch.utils.data.DataLoader(
dataset=test_dataset, batch_size=BATCH_SIZE, shuffle=False
)
return train_loader, test_loader
# Lists to store loss and accuracy values
loss_values = []
train_acc_values = []
val_acc_values = []
def define_model(hyperparameters):
""" Define the multilayer perceptron training_parameters['model'] """
# Define the multilayer perceptron model
model = nn.Sequential()
model.add_module('flatten', nn.Flatten())
input_size = hyperparameters['init_input_size']
for i in range(NUM_HIDDEN_LAYERS):
model.add_module(f'linear{i}', nn.Linear(input_size, WIDTH))
model.add_module(f'relu{i}', nn.ReLU())
input_size = WIDTH
model.add_module('output', nn.Linear(
input_size, hyperparameters['num_classes']))
return model
def get_optimizer(model):
""" Return optimizer function """
if OPTIMIZER_TYPE == 'SGD':
return optim.SGD(model.parameters(), lr=LEARNING_RATE)
if OPTIMIZER_TYPE == 'SGD_Momentum':
return optim.SGD(model.parameters(), lr=LEARNING_RATE, momentum=0.9)
if OPTIMIZER_TYPE == 'Adam':
return optim.Adam(model.parameters(), lr=LEARNING_RATE)
raise ValueError("Unsupported optimizer type!")
def initial_configuration():
"""
Perform all operations needed for training network
"""
# Set random seed for reproducibility
torch.manual_seed(42)
hyperparameters = set_hyperparameters()
# Load MNIST dataset and apply transformations
train_dataset, test_dataset = load_datasets()
train_loader, test_loader = create_data_loaders(
train_dataset, test_dataset)
model = define_model(hyperparameters)
# Loss function
criterion = nn.CrossEntropyLoss()
# training_parameters['optimizer']
optimizer = get_optimizer(model)
return hyperparameters, train_loader, test_loader, model, criterion, optimizer
def single_train_iteration(
data, training_parameters, targets, batch_idx, epoch
):
"""
Train network for single batch
"""
# Reshape the input data
data = data.view(data.size(0), -1)
# Forward pass
outputs = training_parameters['model'](data)
loss = training_parameters['criterion'](outputs, targets)
# Backward pass and optimization
training_parameters['optimizer'].zero_grad()
loss.backward()
training_parameters['optimizer'].step()
# Print loss value for every learning step
if (batch_idx + 1) % 100 == 0:
print(
f'''
Epoch [{epoch+1}/{training_parameters['hyperparameters']["num_epochs"]}],
Step [{batch_idx+1}/{len(training_parameters['loaders']['train_loader'])}],
Loss: {loss.item():.4f}
'''
)
# Append loss value for every learning step
loss_values.append(loss.item())
return data, training_parameters['optimizer']
def set_loaders(train_loader, test_loader):
"""
Put train and test loaders into one object
"""
return {
'train_loader': train_loader,
'test_loader': test_loader
}
def set_training_parameters(hyperparameters, loaders, model, criterion, optimizer):
"""
Put all training parameters into one object
"""
return {
'hyperparameters': hyperparameters,
'loaders': {
'train_loader': loaders['train_loader'],
'test_loader': loaders['test_loader']
},
'model': model,
'criterion': criterion,
'optimizer': optimizer,
}
def training_loop(training_parameters, print_info=True):
"""
Train network for all epochs
"""
epochs_num = training_parameters["hyperparameters"]["num_epochs"]
# Training loop
for epoch in range(epochs_num):
for batch_idx, (data, targets) in enumerate(training_parameters['loaders']['train_loader']):
data, training_parameters['optimizer'] = single_train_iteration(
data, training_parameters, targets, batch_idx, epoch
)
calculate_accuracy_epoch(
training_parameters, epoch, print_info)
calculate_validation_set_accuracy(
training_parameters, epoch, print_info)
return epoch, training_parameters['loaders']['train_loader']
def calculate_accuracy_epoch(training_parameters, epoch, print_info=True):
""" Calculate accuracy on train set after each epoch """
correct = 0
total = 0
for data, targets in training_parameters['loaders']['train_loader']:
data = data.view(data.size(0), -1)
outputs = training_parameters['model'](data)
_, predicted = torch.max(outputs.data, 1)
total += targets.size(0)
correct += (predicted == targets).sum().item()
train_accuracy = 100 * correct / total
if print_info:
print(
f"Accuracy on Train Set after Epoch {epoch+1}: {train_accuracy:.2f}%")
train_acc_values.append(train_accuracy)
def calculate_validation_set_accuracy(training_parameters, epoch, print_info=True):
""" Calculate accuracy on validation set after each epoch """
correct = 0
total = 0
for data, targets in training_parameters['loaders']['test_loader']:
data = data.view(data.size(0), -1)
outputs = training_parameters['model'](data)
_, predicted = torch.max(outputs.data, 1)
total += targets.size(0)
correct += (predicted == targets).sum().item()
validation_accuracy = 100 * correct / total
if print_info:
print(
f"Accuracy on Validation Set after Epoch {epoch+1}: {validation_accuracy:.2f}%"
)
print("---")
val_acc_values.append(validation_accuracy)
def main_part(show_plot=True):
(
HYPERPARAMETERS,
TRAIN_LOADER,
TEST_LOADER,
MODEL,
CRITERION,
OPTIMIZER,
) = initial_configuration()
start_time = time.time()
LOADERS = set_loaders(
TRAIN_LOADER, TEST_LOADER)
TRAINING_PARAMETERS = set_training_parameters(
HYPERPARAMETERS, LOADERS, MODEL, CRITERION, OPTIMIZER)
training_loop(TRAINING_PARAMETERS, show_plot)
file = open("results.txt", "a")
file.write(
"-------------------------------------------------------------------------------------" + "\n")
file.write(
f"loss-lr{LEARNING_RATE}-bs{BATCH_SIZE}-hl{NUM_HIDDEN_LAYERS}-w{WIDTH}-{OPTIMIZER_TYPE}" + "\n")
file.write(f"Execution time: {(time.time() - start_time)}" + "\n")
file.write(
"-------------------------------------------------------------------------------------" + "\n")
# Plot the loss value for every learning step
learning_step_title = f'loss-lr{LEARNING_RATE}-bs{BATCH_SIZE}-hl{NUM_HIDDEN_LAYERS}-w{WIDTH}-{OPTIMIZER_TYPE}.png'
plt.plot(loss_values)
plt.xlabel('Learning Step')
plt.ylabel('Loss')
plt.title(learning_step_title)
plt.savefig(learning_step_title
)
if show_plot:
plt.show()
plt.close()
# Plot the accuracy on train set after each epoch
train_accuracy_title = f'trainAccuracy-lr{LEARNING_RATE}-bs{BATCH_SIZE}-hl{NUM_HIDDEN_LAYERS}-w{WIDTH}-{OPTIMIZER_TYPE}.png'
plt.plot(train_acc_values)
plt.xlabel('Epoch')
plt.ylabel('Train Accuracy')
plt.title(train_accuracy_title)
plt.savefig(
train_accuracy_title)
if show_plot:
plt.show()
plt.close()
# Plot the accuracy on validation set after each epoch
validation_accuracy_title = f'validationAccuracy-lr{LEARNING_RATE}-bs{BATCH_SIZE}-hl{NUM_HIDDEN_LAYERS}-w{WIDTH}-{OPTIMIZER_TYPE}.png'
plt.plot(val_acc_values)
plt.xlabel('Epoch')
plt.ylabel('Validation Accuracy')
plt.title(validation_accuracy_title)
plt.savefig(
validation_accuracy_title)
if show_plot:
plt.show()
plt.close()
if __name__ == "__main__":
LEARNING_RATE = 0.001
BATCH_SIZE = 64
NUM_HIDDEN_LAYERS = 2
WIDTH = 128
OPTIMIZER_TYPE = 'Adam'
main_part(True)
"""
learning_rate_values = [0.1, 0.01, 0.001]
i = 0
MAX_TESTS = 17
for lr in learning_rate_values:
LEARNING_RATE = lr
main_part(False)
i += 1
print(f"Test {i}/{MAX_TESTS} ran")
LEARNING_RATE = 0.001
batch_size_values = [64, 128, 256]
for bs in batch_size_values:
BATCH_SIZE = bs
main_part(False)
i += 1
print(f"Test {i}/{MAX_TESTS} ran")
BATCH_SIZE = 64
hidden_layers_values = [1, 2, 3]
for hl in hidden_layers_values:
NUM_HIDDEN_LAYERS = hl
main_part(False)
i += 1
print(f"Test {i}/{MAX_TESTS} ran")
NUM_HIDDEN_LAYERS = 2
width_values = [64, 128, 256, 512, 1024]
for width in width_values:
WIDTH = width
main_part(False)
i += 1
print(f"Test {i}/{MAX_TESTS} ran")
WIDTH = 128
for optimizer in ['SGD', 'SGD_Momentum', 'Adam']:
OPTIMIZER_TYPE = optimizer
main_part(False)
i += 1
print(f"Test {i}/{MAX_TESTS} ran")
"""

View File

@ -0,0 +1,768 @@
6,148,72,35,0,33.6,0.627,50,1
1,85,66,29,0,26.6,0.351,31,0
8,183,64,0,0,23.3,0.672,32,1
1,89,66,23,94,28.1,0.167,21,0
0,137,40,35,168,43.1,2.288,33,1
5,116,74,0,0,25.6,0.201,30,0
3,78,50,32,88,31.0,0.248,26,1
10,115,0,0,0,35.3,0.134,29,0
2,197,70,45,543,30.5,0.158,53,1
8,125,96,0,0,0.0,0.232,54,1
4,110,92,0,0,37.6,0.191,30,0
10,168,74,0,0,38.0,0.537,34,1
10,139,80,0,0,27.1,1.441,57,0
1,189,60,23,846,30.1,0.398,59,1
5,166,72,19,175,25.8,0.587,51,1
7,100,0,0,0,30.0,0.484,32,1
0,118,84,47,230,45.8,0.551,31,1
7,107,74,0,0,29.6,0.254,31,1
1,103,30,38,83,43.3,0.183,33,0
1,115,70,30,96,34.6,0.529,32,1
3,126,88,41,235,39.3,0.704,27,0
8,99,84,0,0,35.4,0.388,50,0
7,196,90,0,0,39.8,0.451,41,1
9,119,80,35,0,29.0,0.263,29,1
11,143,94,33,146,36.6,0.254,51,1
10,125,70,26,115,31.1,0.205,41,1
7,147,76,0,0,39.4,0.257,43,1
1,97,66,15,140,23.2,0.487,22,0
13,145,82,19,110,22.2,0.245,57,0
5,117,92,0,0,34.1,0.337,38,0
5,109,75,26,0,36.0,0.546,60,0
3,158,76,36,245,31.6,0.851,28,1
3,88,58,11,54,24.8,0.267,22,0
6,92,92,0,0,19.9,0.188,28,0
10,122,78,31,0,27.6,0.512,45,0
4,103,60,33,192,24.0,0.966,33,0
11,138,76,0,0,33.2,0.420,35,0
9,102,76,37,0,32.9,0.665,46,1
2,90,68,42,0,38.2,0.503,27,1
4,111,72,47,207,37.1,1.390,56,1
3,180,64,25,70,34.0,0.271,26,0
7,133,84,0,0,40.2,0.696,37,0
7,106,92,18,0,22.7,0.235,48,0
9,171,110,24,240,45.4,0.721,54,1
7,159,64,0,0,27.4,0.294,40,0
0,180,66,39,0,42.0,1.893,25,1
1,146,56,0,0,29.7,0.564,29,0
2,71,70,27,0,28.0,0.586,22,0
7,103,66,32,0,39.1,0.344,31,1
7,105,0,0,0,0.0,0.305,24,0
1,103,80,11,82,19.4,0.491,22,0
1,101,50,15,36,24.2,0.526,26,0
5,88,66,21,23,24.4,0.342,30,0
8,176,90,34,300,33.7,0.467,58,1
7,150,66,42,342,34.7,0.718,42,0
1,73,50,10,0,23.0,0.248,21,0
7,187,68,39,304,37.7,0.254,41,1
0,100,88,60,110,46.8,0.962,31,0
0,146,82,0,0,40.5,1.781,44,0
0,105,64,41,142,41.5,0.173,22,0
2,84,0,0,0,0.0,0.304,21,0
8,133,72,0,0,32.9,0.270,39,1
5,44,62,0,0,25.0,0.587,36,0
2,141,58,34,128,25.4,0.699,24,0
7,114,66,0,0,32.8,0.258,42,1
5,99,74,27,0,29.0,0.203,32,0
0,109,88,30,0,32.5,0.855,38,1
2,109,92,0,0,42.7,0.845,54,0
1,95,66,13,38,19.6,0.334,25,0
4,146,85,27,100,28.9,0.189,27,0
2,100,66,20,90,32.9,0.867,28,1
5,139,64,35,140,28.6,0.411,26,0
13,126,90,0,0,43.4,0.583,42,1
4,129,86,20,270,35.1,0.231,23,0
1,79,75,30,0,32.0,0.396,22,0
1,0,48,20,0,24.7,0.140,22,0
7,62,78,0,0,32.6,0.391,41,0
5,95,72,33,0,37.7,0.370,27,0
0,131,0,0,0,43.2,0.270,26,1
2,112,66,22,0,25.0,0.307,24,0
3,113,44,13,0,22.4,0.140,22,0
2,74,0,0,0,0.0,0.102,22,0
7,83,78,26,71,29.3,0.767,36,0
0,101,65,28,0,24.6,0.237,22,0
5,137,108,0,0,48.8,0.227,37,1
2,110,74,29,125,32.4,0.698,27,0
13,106,72,54,0,36.6,0.178,45,0
2,100,68,25,71,38.5,0.324,26,0
15,136,70,32,110,37.1,0.153,43,1
1,107,68,19,0,26.5,0.165,24,0
1,80,55,0,0,19.1,0.258,21,0
4,123,80,15,176,32.0,0.443,34,0
7,81,78,40,48,46.7,0.261,42,0
4,134,72,0,0,23.8,0.277,60,1
2,142,82,18,64,24.7,0.761,21,0
6,144,72,27,228,33.9,0.255,40,0
2,92,62,28,0,31.6,0.130,24,0
1,71,48,18,76,20.4,0.323,22,0
6,93,50,30,64,28.7,0.356,23,0
1,122,90,51,220,49.7,0.325,31,1
1,163,72,0,0,39.0,1.222,33,1
1,151,60,0,0,26.1,0.179,22,0
0,125,96,0,0,22.5,0.262,21,0
1,81,72,18,40,26.6,0.283,24,0
2,85,65,0,0,39.6,0.930,27,0
1,126,56,29,152,28.7,0.801,21,0
1,96,122,0,0,22.4,0.207,27,0
4,144,58,28,140,29.5,0.287,37,0
3,83,58,31,18,34.3,0.336,25,0
0,95,85,25,36,37.4,0.247,24,1
3,171,72,33,135,33.3,0.199,24,1
8,155,62,26,495,34.0,0.543,46,1
1,89,76,34,37,31.2,0.192,23,0
4,76,62,0,0,34.0,0.391,25,0
7,160,54,32,175,30.5,0.588,39,1
4,146,92,0,0,31.2,0.539,61,1
5,124,74,0,0,34.0,0.220,38,1
5,78,48,0,0,33.7,0.654,25,0
4,97,60,23,0,28.2,0.443,22,0
4,99,76,15,51,23.2,0.223,21,0
0,162,76,56,100,53.2,0.759,25,1
6,111,64,39,0,34.2,0.260,24,0
2,107,74,30,100,33.6,0.404,23,0
5,132,80,0,0,26.8,0.186,69,0
0,113,76,0,0,33.3,0.278,23,1
1,88,30,42,99,55.0,0.496,26,1
3,120,70,30,135,42.9,0.452,30,0
1,118,58,36,94,33.3,0.261,23,0
1,117,88,24,145,34.5,0.403,40,1
0,105,84,0,0,27.9,0.741,62,1
4,173,70,14,168,29.7,0.361,33,1
9,122,56,0,0,33.3,1.114,33,1
3,170,64,37,225,34.5,0.356,30,1
8,84,74,31,0,38.3,0.457,39,0
2,96,68,13,49,21.1,0.647,26,0
2,125,60,20,140,33.8,0.088,31,0
0,100,70,26,50,30.8,0.597,21,0
0,93,60,25,92,28.7,0.532,22,0
0,129,80,0,0,31.2,0.703,29,0
5,105,72,29,325,36.9,0.159,28,0
3,128,78,0,0,21.1,0.268,55,0
5,106,82,30,0,39.5,0.286,38,0
2,108,52,26,63,32.5,0.318,22,0
10,108,66,0,0,32.4,0.272,42,1
4,154,62,31,284,32.8,0.237,23,0
0,102,75,23,0,0.0,0.572,21,0
9,57,80,37,0,32.8,0.096,41,0
2,106,64,35,119,30.5,1.400,34,0
5,147,78,0,0,33.7,0.218,65,0
2,90,70,17,0,27.3,0.085,22,0
1,136,74,50,204,37.4,0.399,24,0
4,114,65,0,0,21.9,0.432,37,0
9,156,86,28,155,34.3,1.189,42,1
1,153,82,42,485,40.6,0.687,23,0
8,188,78,0,0,47.9,0.137,43,1
7,152,88,44,0,50.0,0.337,36,1
2,99,52,15,94,24.6,0.637,21,0
1,109,56,21,135,25.2,0.833,23,0
2,88,74,19,53,29.0,0.229,22,0
17,163,72,41,114,40.9,0.817,47,1
4,151,90,38,0,29.7,0.294,36,0
7,102,74,40,105,37.2,0.204,45,0
0,114,80,34,285,44.2,0.167,27,0
2,100,64,23,0,29.7,0.368,21,0
0,131,88,0,0,31.6,0.743,32,1
6,104,74,18,156,29.9,0.722,41,1
3,148,66,25,0,32.5,0.256,22,0
4,120,68,0,0,29.6,0.709,34,0
4,110,66,0,0,31.9,0.471,29,0
3,111,90,12,78,28.4,0.495,29,0
6,102,82,0,0,30.8,0.180,36,1
6,134,70,23,130,35.4,0.542,29,1
2,87,0,23,0,28.9,0.773,25,0
1,79,60,42,48,43.5,0.678,23,0
2,75,64,24,55,29.7,0.370,33,0
8,179,72,42,130,32.7,0.719,36,1
6,85,78,0,0,31.2,0.382,42,0
0,129,110,46,130,67.1,0.319,26,1
5,143,78,0,0,45.0,0.190,47,0
5,130,82,0,0,39.1,0.956,37,1
6,87,80,0,0,23.2,0.084,32,0
0,119,64,18,92,34.9,0.725,23,0
1,0,74,20,23,27.7,0.299,21,0
5,73,60,0,0,26.8,0.268,27,0
4,141,74,0,0,27.6,0.244,40,0
7,194,68,28,0,35.9,0.745,41,1
8,181,68,36,495,30.1,0.615,60,1
1,128,98,41,58,32.0,1.321,33,1
8,109,76,39,114,27.9,0.640,31,1
5,139,80,35,160,31.6,0.361,25,1
3,111,62,0,0,22.6,0.142,21,0
9,123,70,44,94,33.1,0.374,40,0
7,159,66,0,0,30.4,0.383,36,1
11,135,0,0,0,52.3,0.578,40,1
8,85,55,20,0,24.4,0.136,42,0
5,158,84,41,210,39.4,0.395,29,1
1,105,58,0,0,24.3,0.187,21,0
3,107,62,13,48,22.9,0.678,23,1
4,109,64,44,99,34.8,0.905,26,1
4,148,60,27,318,30.9,0.150,29,1
0,113,80,16,0,31.0,0.874,21,0
1,138,82,0,0,40.1,0.236,28,0
0,108,68,20,0,27.3,0.787,32,0
2,99,70,16,44,20.4,0.235,27,0
6,103,72,32,190,37.7,0.324,55,0
5,111,72,28,0,23.9,0.407,27,0
8,196,76,29,280,37.5,0.605,57,1
5,162,104,0,0,37.7,0.151,52,1
1,96,64,27,87,33.2,0.289,21,0
7,184,84,33,0,35.5,0.355,41,1
2,81,60,22,0,27.7,0.290,25,0
0,147,85,54,0,42.8,0.375,24,0
7,179,95,31,0,34.2,0.164,60,0
0,140,65,26,130,42.6,0.431,24,1
9,112,82,32,175,34.2,0.260,36,1
12,151,70,40,271,41.8,0.742,38,1
5,109,62,41,129,35.8,0.514,25,1
6,125,68,30,120,30.0,0.464,32,0
5,85,74,22,0,29.0,1.224,32,1
5,112,66,0,0,37.8,0.261,41,1
0,177,60,29,478,34.6,1.072,21,1
2,158,90,0,0,31.6,0.805,66,1
7,119,0,0,0,25.2,0.209,37,0
7,142,60,33,190,28.8,0.687,61,0
1,100,66,15,56,23.6,0.666,26,0
1,87,78,27,32,34.6,0.101,22,0
0,101,76,0,0,35.7,0.198,26,0
3,162,52,38,0,37.2,0.652,24,1
4,197,70,39,744,36.7,2.329,31,0
0,117,80,31,53,45.2,0.089,24,0
4,142,86,0,0,44.0,0.645,22,1
6,134,80,37,370,46.2,0.238,46,1
1,79,80,25,37,25.4,0.583,22,0
4,122,68,0,0,35.0,0.394,29,0
3,74,68,28,45,29.7,0.293,23,0
4,171,72,0,0,43.6,0.479,26,1
7,181,84,21,192,35.9,0.586,51,1
0,179,90,27,0,44.1,0.686,23,1
9,164,84,21,0,30.8,0.831,32,1
0,104,76,0,0,18.4,0.582,27,0
1,91,64,24,0,29.2,0.192,21,0
4,91,70,32,88,33.1,0.446,22,0
3,139,54,0,0,25.6,0.402,22,1
6,119,50,22,176,27.1,1.318,33,1
2,146,76,35,194,38.2,0.329,29,0
9,184,85,15,0,30.0,1.213,49,1
10,122,68,0,0,31.2,0.258,41,0
0,165,90,33,680,52.3,0.427,23,0
9,124,70,33,402,35.4,0.282,34,0
1,111,86,19,0,30.1,0.143,23,0
9,106,52,0,0,31.2,0.380,42,0
2,129,84,0,0,28.0,0.284,27,0
2,90,80,14,55,24.4,0.249,24,0
0,86,68,32,0,35.8,0.238,25,0
12,92,62,7,258,27.6,0.926,44,1
1,113,64,35,0,33.6,0.543,21,1
3,111,56,39,0,30.1,0.557,30,0
2,114,68,22,0,28.7,0.092,25,0
1,193,50,16,375,25.9,0.655,24,0
11,155,76,28,150,33.3,1.353,51,1
3,191,68,15,130,30.9,0.299,34,0
3,141,0,0,0,30.0,0.761,27,1
4,95,70,32,0,32.1,0.612,24,0
3,142,80,15,0,32.4,0.200,63,0
4,123,62,0,0,32.0,0.226,35,1
5,96,74,18,67,33.6,0.997,43,0
0,138,0,0,0,36.3,0.933,25,1
2,128,64,42,0,40.0,1.101,24,0
0,102,52,0,0,25.1,0.078,21,0
2,146,0,0,0,27.5,0.240,28,1
10,101,86,37,0,45.6,1.136,38,1
2,108,62,32,56,25.2,0.128,21,0
3,122,78,0,0,23.0,0.254,40,0
1,71,78,50,45,33.2,0.422,21,0
13,106,70,0,0,34.2,0.251,52,0
2,100,70,52,57,40.5,0.677,25,0
7,106,60,24,0,26.5,0.296,29,1
0,104,64,23,116,27.8,0.454,23,0
5,114,74,0,0,24.9,0.744,57,0
2,108,62,10,278,25.3,0.881,22,0
0,146,70,0,0,37.9,0.334,28,1
10,129,76,28,122,35.9,0.280,39,0
7,133,88,15,155,32.4,0.262,37,0
7,161,86,0,0,30.4,0.165,47,1
2,108,80,0,0,27.0,0.259,52,1
7,136,74,26,135,26.0,0.647,51,0
5,155,84,44,545,38.7,0.619,34,0
1,119,86,39,220,45.6,0.808,29,1
4,96,56,17,49,20.8,0.340,26,0
5,108,72,43,75,36.1,0.263,33,0
0,78,88,29,40,36.9,0.434,21,0
0,107,62,30,74,36.6,0.757,25,1
2,128,78,37,182,43.3,1.224,31,1
1,128,48,45,194,40.5,0.613,24,1
0,161,50,0,0,21.9,0.254,65,0
6,151,62,31,120,35.5,0.692,28,0
2,146,70,38,360,28.0,0.337,29,1
0,126,84,29,215,30.7,0.520,24,0
14,100,78,25,184,36.6,0.412,46,1
8,112,72,0,0,23.6,0.840,58,0
0,167,0,0,0,32.3,0.839,30,1
2,144,58,33,135,31.6,0.422,25,1
5,77,82,41,42,35.8,0.156,35,0
5,115,98,0,0,52.9,0.209,28,1
3,150,76,0,0,21.0,0.207,37,0
2,120,76,37,105,39.7,0.215,29,0
10,161,68,23,132,25.5,0.326,47,1
0,137,68,14,148,24.8,0.143,21,0
0,128,68,19,180,30.5,1.391,25,1
2,124,68,28,205,32.9,0.875,30,1
6,80,66,30,0,26.2,0.313,41,0
0,106,70,37,148,39.4,0.605,22,0
2,155,74,17,96,26.6,0.433,27,1
3,113,50,10,85,29.5,0.626,25,0
7,109,80,31,0,35.9,1.127,43,1
2,112,68,22,94,34.1,0.315,26,0
3,99,80,11,64,19.3,0.284,30,0
3,182,74,0,0,30.5,0.345,29,1
3,115,66,39,140,38.1,0.150,28,0
6,194,78,0,0,23.5,0.129,59,1
4,129,60,12,231,27.5,0.527,31,0
3,112,74,30,0,31.6,0.197,25,1
0,124,70,20,0,27.4,0.254,36,1
13,152,90,33,29,26.8,0.731,43,1
2,112,75,32,0,35.7,0.148,21,0
1,157,72,21,168,25.6,0.123,24,0
1,122,64,32,156,35.1,0.692,30,1
10,179,70,0,0,35.1,0.200,37,0
2,102,86,36,120,45.5,0.127,23,1
6,105,70,32,68,30.8,0.122,37,0
8,118,72,19,0,23.1,1.476,46,0
2,87,58,16,52,32.7,0.166,25,0
1,180,0,0,0,43.3,0.282,41,1
12,106,80,0,0,23.6,0.137,44,0
1,95,60,18,58,23.9,0.260,22,0
0,165,76,43,255,47.9,0.259,26,0
0,117,0,0,0,33.8,0.932,44,0
5,115,76,0,0,31.2,0.343,44,1
9,152,78,34,171,34.2,0.893,33,1
7,178,84,0,0,39.9,0.331,41,1
1,130,70,13,105,25.9,0.472,22,0
1,95,74,21,73,25.9,0.673,36,0
1,0,68,35,0,32.0,0.389,22,0
5,122,86,0,0,34.7,0.290,33,0
8,95,72,0,0,36.8,0.485,57,0
8,126,88,36,108,38.5,0.349,49,0
1,139,46,19,83,28.7,0.654,22,0
3,116,0,0,0,23.5,0.187,23,0
3,99,62,19,74,21.8,0.279,26,0
5,0,80,32,0,41.0,0.346,37,1
4,92,80,0,0,42.2,0.237,29,0
4,137,84,0,0,31.2,0.252,30,0
3,61,82,28,0,34.4,0.243,46,0
1,90,62,12,43,27.2,0.580,24,0
3,90,78,0,0,42.7,0.559,21,0
9,165,88,0,0,30.4,0.302,49,1
1,125,50,40,167,33.3,0.962,28,1
13,129,0,30,0,39.9,0.569,44,1
12,88,74,40,54,35.3,0.378,48,0
1,196,76,36,249,36.5,0.875,29,1
5,189,64,33,325,31.2,0.583,29,1
5,158,70,0,0,29.8,0.207,63,0
5,103,108,37,0,39.2,0.305,65,0
4,146,78,0,0,38.5,0.520,67,1
4,147,74,25,293,34.9,0.385,30,0
5,99,54,28,83,34.0,0.499,30,0
6,124,72,0,0,27.6,0.368,29,1
0,101,64,17,0,21.0,0.252,21,0
3,81,86,16,66,27.5,0.306,22,0
1,133,102,28,140,32.8,0.234,45,1
3,173,82,48,465,38.4,2.137,25,1
0,118,64,23,89,0.0,1.731,21,0
0,84,64,22,66,35.8,0.545,21,0
2,105,58,40,94,34.9,0.225,25,0
2,122,52,43,158,36.2,0.816,28,0
12,140,82,43,325,39.2,0.528,58,1
0,98,82,15,84,25.2,0.299,22,0
1,87,60,37,75,37.2,0.509,22,0
4,156,75,0,0,48.3,0.238,32,1
0,93,100,39,72,43.4,1.021,35,0
1,107,72,30,82,30.8,0.821,24,0
0,105,68,22,0,20.0,0.236,22,0
1,109,60,8,182,25.4,0.947,21,0
1,90,62,18,59,25.1,1.268,25,0
1,125,70,24,110,24.3,0.221,25,0
1,119,54,13,50,22.3,0.205,24,0
5,116,74,29,0,32.3,0.660,35,1
8,105,100,36,0,43.3,0.239,45,1
5,144,82,26,285,32.0,0.452,58,1
3,100,68,23,81,31.6,0.949,28,0
1,100,66,29,196,32.0,0.444,42,0
5,166,76,0,0,45.7,0.340,27,1
1,131,64,14,415,23.7,0.389,21,0
4,116,72,12,87,22.1,0.463,37,0
4,158,78,0,0,32.9,0.803,31,1
2,127,58,24,275,27.7,1.600,25,0
3,96,56,34,115,24.7,0.944,39,0
0,131,66,40,0,34.3,0.196,22,1
3,82,70,0,0,21.1,0.389,25,0
3,193,70,31,0,34.9,0.241,25,1
4,95,64,0,0,32.0,0.161,31,1
6,137,61,0,0,24.2,0.151,55,0
5,136,84,41,88,35.0,0.286,35,1
9,72,78,25,0,31.6,0.280,38,0
5,168,64,0,0,32.9,0.135,41,1
2,123,48,32,165,42.1,0.520,26,0
4,115,72,0,0,28.9,0.376,46,1
0,101,62,0,0,21.9,0.336,25,0
8,197,74,0,0,25.9,1.191,39,1
1,172,68,49,579,42.4,0.702,28,1
6,102,90,39,0,35.7,0.674,28,0
1,112,72,30,176,34.4,0.528,25,0
1,143,84,23,310,42.4,1.076,22,0
1,143,74,22,61,26.2,0.256,21,0
0,138,60,35,167,34.6,0.534,21,1
3,173,84,33,474,35.7,0.258,22,1
1,97,68,21,0,27.2,1.095,22,0
4,144,82,32,0,38.5,0.554,37,1
1,83,68,0,0,18.2,0.624,27,0
3,129,64,29,115,26.4,0.219,28,1
1,119,88,41,170,45.3,0.507,26,0
2,94,68,18,76,26.0,0.561,21,0
0,102,64,46,78,40.6,0.496,21,0
2,115,64,22,0,30.8,0.421,21,0
8,151,78,32,210,42.9,0.516,36,1
4,184,78,39,277,37.0,0.264,31,1
0,94,0,0,0,0.0,0.256,25,0
1,181,64,30,180,34.1,0.328,38,1
0,135,94,46,145,40.6,0.284,26,0
1,95,82,25,180,35.0,0.233,43,1
2,99,0,0,0,22.2,0.108,23,0
3,89,74,16,85,30.4,0.551,38,0
1,80,74,11,60,30.0,0.527,22,0
2,139,75,0,0,25.6,0.167,29,0
1,90,68,8,0,24.5,1.138,36,0
0,141,0,0,0,42.4,0.205,29,1
12,140,85,33,0,37.4,0.244,41,0
5,147,75,0,0,29.9,0.434,28,0
1,97,70,15,0,18.2,0.147,21,0
6,107,88,0,0,36.8,0.727,31,0
0,189,104,25,0,34.3,0.435,41,1
2,83,66,23,50,32.2,0.497,22,0
4,117,64,27,120,33.2,0.230,24,0
8,108,70,0,0,30.5,0.955,33,1
4,117,62,12,0,29.7,0.380,30,1
0,180,78,63,14,59.4,2.420,25,1
1,100,72,12,70,25.3,0.658,28,0
0,95,80,45,92,36.5,0.330,26,0
0,104,64,37,64,33.6,0.510,22,1
0,120,74,18,63,30.5,0.285,26,0
1,82,64,13,95,21.2,0.415,23,0
2,134,70,0,0,28.9,0.542,23,1
0,91,68,32,210,39.9,0.381,25,0
2,119,0,0,0,19.6,0.832,72,0
2,100,54,28,105,37.8,0.498,24,0
14,175,62,30,0,33.6,0.212,38,1
1,135,54,0,0,26.7,0.687,62,0
5,86,68,28,71,30.2,0.364,24,0
10,148,84,48,237,37.6,1.001,51,1
9,134,74,33,60,25.9,0.460,81,0
9,120,72,22,56,20.8,0.733,48,0
1,71,62,0,0,21.8,0.416,26,0
8,74,70,40,49,35.3,0.705,39,0
5,88,78,30,0,27.6,0.258,37,0
10,115,98,0,0,24.0,1.022,34,0
0,124,56,13,105,21.8,0.452,21,0
0,74,52,10,36,27.8,0.269,22,0
0,97,64,36,100,36.8,0.600,25,0
8,120,0,0,0,30.0,0.183,38,1
6,154,78,41,140,46.1,0.571,27,0
1,144,82,40,0,41.3,0.607,28,0
0,137,70,38,0,33.2,0.170,22,0
0,119,66,27,0,38.8,0.259,22,0
7,136,90,0,0,29.9,0.210,50,0
4,114,64,0,0,28.9,0.126,24,0
0,137,84,27,0,27.3,0.231,59,0
2,105,80,45,191,33.7,0.711,29,1
7,114,76,17,110,23.8,0.466,31,0
8,126,74,38,75,25.9,0.162,39,0
4,132,86,31,0,28.0,0.419,63,0
3,158,70,30,328,35.5,0.344,35,1
0,123,88,37,0,35.2,0.197,29,0
4,85,58,22,49,27.8,0.306,28,0
0,84,82,31,125,38.2,0.233,23,0
0,145,0,0,0,44.2,0.630,31,1
0,135,68,42,250,42.3,0.365,24,1
1,139,62,41,480,40.7,0.536,21,0
0,173,78,32,265,46.5,1.159,58,0
4,99,72,17,0,25.6,0.294,28,0
8,194,80,0,0,26.1,0.551,67,0
2,83,65,28,66,36.8,0.629,24,0
2,89,90,30,0,33.5,0.292,42,0
4,99,68,38,0,32.8,0.145,33,0
4,125,70,18,122,28.9,1.144,45,1
3,80,0,0,0,0.0,0.174,22,0
6,166,74,0,0,26.6,0.304,66,0
5,110,68,0,0,26.0,0.292,30,0
2,81,72,15,76,30.1,0.547,25,0
7,195,70,33,145,25.1,0.163,55,1
6,154,74,32,193,29.3,0.839,39,0
2,117,90,19,71,25.2,0.313,21,0
3,84,72,32,0,37.2,0.267,28,0
6,0,68,41,0,39.0,0.727,41,1
7,94,64,25,79,33.3,0.738,41,0
3,96,78,39,0,37.3,0.238,40,0
10,75,82,0,0,33.3,0.263,38,0
0,180,90,26,90,36.5,0.314,35,1
1,130,60,23,170,28.6,0.692,21,0
2,84,50,23,76,30.4,0.968,21,0
8,120,78,0,0,25.0,0.409,64,0
12,84,72,31,0,29.7,0.297,46,1
0,139,62,17,210,22.1,0.207,21,0
9,91,68,0,0,24.2,0.200,58,0
2,91,62,0,0,27.3,0.525,22,0
3,99,54,19,86,25.6,0.154,24,0
3,163,70,18,105,31.6,0.268,28,1
9,145,88,34,165,30.3,0.771,53,1
7,125,86,0,0,37.6,0.304,51,0
13,76,60,0,0,32.8,0.180,41,0
6,129,90,7,326,19.6,0.582,60,0
2,68,70,32,66,25.0,0.187,25,0
3,124,80,33,130,33.2,0.305,26,0
6,114,0,0,0,0.0,0.189,26,0
9,130,70,0,0,34.2,0.652,45,1
3,125,58,0,0,31.6,0.151,24,0
3,87,60,18,0,21.8,0.444,21,0
1,97,64,19,82,18.2,0.299,21,0
3,116,74,15,105,26.3,0.107,24,0
0,117,66,31,188,30.8,0.493,22,0
0,111,65,0,0,24.6,0.660,31,0
2,122,60,18,106,29.8,0.717,22,0
0,107,76,0,0,45.3,0.686,24,0
1,86,66,52,65,41.3,0.917,29,0
6,91,0,0,0,29.8,0.501,31,0
1,77,56,30,56,33.3,1.251,24,0
4,132,0,0,0,32.9,0.302,23,1
0,105,90,0,0,29.6,0.197,46,0
0,57,60,0,0,21.7,0.735,67,0
0,127,80,37,210,36.3,0.804,23,0
3,129,92,49,155,36.4,0.968,32,1
8,100,74,40,215,39.4,0.661,43,1
3,128,72,25,190,32.4,0.549,27,1
10,90,85,32,0,34.9,0.825,56,1
4,84,90,23,56,39.5,0.159,25,0
1,88,78,29,76,32.0,0.365,29,0
8,186,90,35,225,34.5,0.423,37,1
5,187,76,27,207,43.6,1.034,53,1
4,131,68,21,166,33.1,0.160,28,0
1,164,82,43,67,32.8,0.341,50,0
4,189,110,31,0,28.5,0.680,37,0
1,116,70,28,0,27.4,0.204,21,0
3,84,68,30,106,31.9,0.591,25,0
6,114,88,0,0,27.8,0.247,66,0
1,88,62,24,44,29.9,0.422,23,0
1,84,64,23,115,36.9,0.471,28,0
7,124,70,33,215,25.5,0.161,37,0
1,97,70,40,0,38.1,0.218,30,0
8,110,76,0,0,27.8,0.237,58,0
11,103,68,40,0,46.2,0.126,42,0
11,85,74,0,0,30.1,0.300,35,0
6,125,76,0,0,33.8,0.121,54,1
0,198,66,32,274,41.3,0.502,28,1
1,87,68,34,77,37.6,0.401,24,0
6,99,60,19,54,26.9,0.497,32,0
0,91,80,0,0,32.4,0.601,27,0
2,95,54,14,88,26.1,0.748,22,0
1,99,72,30,18,38.6,0.412,21,0
6,92,62,32,126,32.0,0.085,46,0
4,154,72,29,126,31.3,0.338,37,0
0,121,66,30,165,34.3,0.203,33,1
3,78,70,0,0,32.5,0.270,39,0
2,130,96,0,0,22.6,0.268,21,0
3,111,58,31,44,29.5,0.430,22,0
2,98,60,17,120,34.7,0.198,22,0
1,143,86,30,330,30.1,0.892,23,0
1,119,44,47,63,35.5,0.280,25,0
6,108,44,20,130,24.0,0.813,35,0
2,118,80,0,0,42.9,0.693,21,1
10,133,68,0,0,27.0,0.245,36,0
2,197,70,99,0,34.7,0.575,62,1
0,151,90,46,0,42.1,0.371,21,1
6,109,60,27,0,25.0,0.206,27,0
12,121,78,17,0,26.5,0.259,62,0
8,100,76,0,0,38.7,0.190,42,0
8,124,76,24,600,28.7,0.687,52,1
1,93,56,11,0,22.5,0.417,22,0
8,143,66,0,0,34.9,0.129,41,1
6,103,66,0,0,24.3,0.249,29,0
3,176,86,27,156,33.3,1.154,52,1
0,73,0,0,0,21.1,0.342,25,0
11,111,84,40,0,46.8,0.925,45,1
2,112,78,50,140,39.4,0.175,24,0
3,132,80,0,0,34.4,0.402,44,1
2,82,52,22,115,28.5,1.699,25,0
6,123,72,45,230,33.6,0.733,34,0
0,188,82,14,185,32.0,0.682,22,1
0,67,76,0,0,45.3,0.194,46,0
1,89,24,19,25,27.8,0.559,21,0
1,173,74,0,0,36.8,0.088,38,1
1,109,38,18,120,23.1,0.407,26,0
1,108,88,19,0,27.1,0.400,24,0
6,96,0,0,0,23.7,0.190,28,0
1,124,74,36,0,27.8,0.100,30,0
7,150,78,29,126,35.2,0.692,54,1
4,183,0,0,0,28.4,0.212,36,1
1,124,60,32,0,35.8,0.514,21,0
1,181,78,42,293,40.0,1.258,22,1
1,92,62,25,41,19.5,0.482,25,0
0,152,82,39,272,41.5,0.270,27,0
1,111,62,13,182,24.0,0.138,23,0
3,106,54,21,158,30.9,0.292,24,0
3,174,58,22,194,32.9,0.593,36,1
7,168,88,42,321,38.2,0.787,40,1
6,105,80,28,0,32.5,0.878,26,0
11,138,74,26,144,36.1,0.557,50,1
3,106,72,0,0,25.8,0.207,27,0
6,117,96,0,0,28.7,0.157,30,0
2,68,62,13,15,20.1,0.257,23,0
9,112,82,24,0,28.2,1.282,50,1
0,119,0,0,0,32.4,0.141,24,1
2,112,86,42,160,38.4,0.246,28,0
2,92,76,20,0,24.2,1.698,28,0
6,183,94,0,0,40.8,1.461,45,0
0,94,70,27,115,43.5,0.347,21,0
2,108,64,0,0,30.8,0.158,21,0
4,90,88,47,54,37.7,0.362,29,0
0,125,68,0,0,24.7,0.206,21,0
0,132,78,0,0,32.4,0.393,21,0
5,128,80,0,0,34.6,0.144,45,0
4,94,65,22,0,24.7,0.148,21,0
7,114,64,0,0,27.4,0.732,34,1
0,102,78,40,90,34.5,0.238,24,0
2,111,60,0,0,26.2,0.343,23,0
1,128,82,17,183,27.5,0.115,22,0
10,92,62,0,0,25.9,0.167,31,0
13,104,72,0,0,31.2,0.465,38,1
5,104,74,0,0,28.8,0.153,48,0
2,94,76,18,66,31.6,0.649,23,0
7,97,76,32,91,40.9,0.871,32,1
1,100,74,12,46,19.5,0.149,28,0
0,102,86,17,105,29.3,0.695,27,0
4,128,70,0,0,34.3,0.303,24,0
6,147,80,0,0,29.5,0.178,50,1
4,90,0,0,0,28.0,0.610,31,0
3,103,72,30,152,27.6,0.730,27,0
2,157,74,35,440,39.4,0.134,30,0
1,167,74,17,144,23.4,0.447,33,1
0,179,50,36,159,37.8,0.455,22,1
11,136,84,35,130,28.3,0.260,42,1
0,107,60,25,0,26.4,0.133,23,0
1,91,54,25,100,25.2,0.234,23,0
1,117,60,23,106,33.8,0.466,27,0
5,123,74,40,77,34.1,0.269,28,0
2,120,54,0,0,26.8,0.455,27,0
1,106,70,28,135,34.2,0.142,22,0
2,155,52,27,540,38.7,0.240,25,1
2,101,58,35,90,21.8,0.155,22,0
1,120,80,48,200,38.9,1.162,41,0
11,127,106,0,0,39.0,0.190,51,0
3,80,82,31,70,34.2,1.292,27,1
10,162,84,0,0,27.7,0.182,54,0
1,199,76,43,0,42.9,1.394,22,1
8,167,106,46,231,37.6,0.165,43,1
9,145,80,46,130,37.9,0.637,40,1
6,115,60,39,0,33.7,0.245,40,1
1,112,80,45,132,34.8,0.217,24,0
4,145,82,18,0,32.5,0.235,70,1
10,111,70,27,0,27.5,0.141,40,1
6,98,58,33,190,34.0,0.430,43,0
9,154,78,30,100,30.9,0.164,45,0
6,165,68,26,168,33.6,0.631,49,0
1,99,58,10,0,25.4,0.551,21,0
10,68,106,23,49,35.5,0.285,47,0
3,123,100,35,240,57.3,0.880,22,0
8,91,82,0,0,35.6,0.587,68,0
6,195,70,0,0,30.9,0.328,31,1
9,156,86,0,0,24.8,0.230,53,1
0,93,60,0,0,35.3,0.263,25,0
3,121,52,0,0,36.0,0.127,25,1
2,101,58,17,265,24.2,0.614,23,0
2,56,56,28,45,24.2,0.332,22,0
0,162,76,36,0,49.6,0.364,26,1
0,95,64,39,105,44.6,0.366,22,0
4,125,80,0,0,32.3,0.536,27,1
5,136,82,0,0,0.0,0.640,69,0
2,129,74,26,205,33.2,0.591,25,0
3,130,64,0,0,23.1,0.314,22,0
1,107,50,19,0,28.3,0.181,29,0
1,140,74,26,180,24.1,0.828,23,0
1,144,82,46,180,46.1,0.335,46,1
8,107,80,0,0,24.6,0.856,34,0
13,158,114,0,0,42.3,0.257,44,1
2,121,70,32,95,39.1,0.886,23,0
7,129,68,49,125,38.5,0.439,43,1
2,90,60,0,0,23.5,0.191,25,0
7,142,90,24,480,30.4,0.128,43,1
3,169,74,19,125,29.9,0.268,31,1
0,99,0,0,0,25.0,0.253,22,0
4,127,88,11,155,34.5,0.598,28,0
4,118,70,0,0,44.5,0.904,26,0
2,122,76,27,200,35.9,0.483,26,0
6,125,78,31,0,27.6,0.565,49,1
1,168,88,29,0,35.0,0.905,52,1
2,129,0,0,0,38.5,0.304,41,0
4,110,76,20,100,28.4,0.118,27,0
6,80,80,36,0,39.8,0.177,28,0
10,115,0,0,0,0.0,0.261,30,1
2,127,46,21,335,34.4,0.176,22,0
9,164,78,0,0,32.8,0.148,45,1
2,93,64,32,160,38.0,0.674,23,1
3,158,64,13,387,31.2,0.295,24,0
5,126,78,27,22,29.6,0.439,40,0
10,129,62,36,0,41.2,0.441,38,1
0,134,58,20,291,26.4,0.352,21,0
3,102,74,0,0,29.5,0.121,32,0
7,187,50,33,392,33.9,0.826,34,1
3,173,78,39,185,33.8,0.970,31,1
10,94,72,18,0,23.1,0.595,56,0
1,108,60,46,178,35.5,0.415,24,0
5,97,76,27,0,35.6,0.378,52,1
4,83,86,19,0,29.3,0.317,34,0
1,114,66,36,200,38.1,0.289,21,0
1,149,68,29,127,29.3,0.349,42,1
5,117,86,30,105,39.1,0.251,42,0
1,111,94,0,0,32.8,0.265,45,0
4,112,78,40,0,39.4,0.236,38,0
1,116,78,29,180,36.1,0.496,25,0
0,141,84,26,0,32.4,0.433,22,0
2,175,88,0,0,22.9,0.326,22,0
2,92,52,0,0,30.1,0.141,22,0
3,130,78,23,79,28.4,0.323,34,1
8,120,86,0,0,28.4,0.259,22,1
2,174,88,37,120,44.5,0.646,24,1
2,106,56,27,165,29.0,0.426,22,0
2,105,75,0,0,23.3,0.560,53,0
4,95,60,32,0,35.4,0.284,28,0
0,126,86,27,120,27.4,0.515,21,0
8,65,72,23,0,32.0,0.600,42,0
2,99,60,17,160,36.6,0.453,21,0
1,102,74,0,0,39.5,0.293,42,1
11,120,80,37,150,42.3,0.785,48,1
3,102,44,20,94,30.8,0.400,26,0
1,109,58,18,116,28.5,0.219,22,0
9,140,94,0,0,32.7,0.734,45,1
13,153,88,37,140,40.6,1.174,39,0
12,100,84,33,105,30.0,0.488,46,0
1,147,94,41,0,49.3,0.358,27,1
1,81,74,41,57,46.3,1.096,32,0
3,187,70,22,200,36.4,0.408,36,1
6,162,62,0,0,24.3,0.178,50,1
4,136,70,0,0,31.2,1.182,22,1
1,121,78,39,74,39.0,0.261,28,0
3,108,62,24,0,26.0,0.223,25,0
0,181,88,44,510,43.3,0.222,26,1
8,154,78,32,0,32.4,0.443,45,1
1,128,88,39,110,36.5,1.057,37,1
7,137,90,41,0,32.0,0.391,39,0
0,123,72,0,0,36.3,0.258,52,1
1,106,76,0,0,37.5,0.197,26,0
6,190,92,0,0,35.5,0.278,66,1
2,88,58,26,16,28.4,0.766,22,0
9,170,74,31,0,44.0,0.403,43,1
9,89,62,0,0,22.5,0.142,33,0
10,101,76,48,180,32.9,0.171,63,0
2,122,70,27,0,36.8,0.340,27,0
5,121,72,23,112,26.2,0.245,30,0
1,126,60,0,0,30.1,0.349,47,1
1,93,70,31,0,30.4,0.315,23,0
1 6 148 72 35 0 33.6 0.627 50 1
2 1 85 66 29 0 26.6 0.351 31 0
3 8 183 64 0 0 23.3 0.672 32 1
4 1 89 66 23 94 28.1 0.167 21 0
5 0 137 40 35 168 43.1 2.288 33 1
6 5 116 74 0 0 25.6 0.201 30 0
7 3 78 50 32 88 31.0 0.248 26 1
8 10 115 0 0 0 35.3 0.134 29 0
9 2 197 70 45 543 30.5 0.158 53 1
10 8 125 96 0 0 0.0 0.232 54 1
11 4 110 92 0 0 37.6 0.191 30 0
12 10 168 74 0 0 38.0 0.537 34 1
13 10 139 80 0 0 27.1 1.441 57 0
14 1 189 60 23 846 30.1 0.398 59 1
15 5 166 72 19 175 25.8 0.587 51 1
16 7 100 0 0 0 30.0 0.484 32 1
17 0 118 84 47 230 45.8 0.551 31 1
18 7 107 74 0 0 29.6 0.254 31 1
19 1 103 30 38 83 43.3 0.183 33 0
20 1 115 70 30 96 34.6 0.529 32 1
21 3 126 88 41 235 39.3 0.704 27 0
22 8 99 84 0 0 35.4 0.388 50 0
23 7 196 90 0 0 39.8 0.451 41 1
24 9 119 80 35 0 29.0 0.263 29 1
25 11 143 94 33 146 36.6 0.254 51 1
26 10 125 70 26 115 31.1 0.205 41 1
27 7 147 76 0 0 39.4 0.257 43 1
28 1 97 66 15 140 23.2 0.487 22 0
29 13 145 82 19 110 22.2 0.245 57 0
30 5 117 92 0 0 34.1 0.337 38 0
31 5 109 75 26 0 36.0 0.546 60 0
32 3 158 76 36 245 31.6 0.851 28 1
33 3 88 58 11 54 24.8 0.267 22 0
34 6 92 92 0 0 19.9 0.188 28 0
35 10 122 78 31 0 27.6 0.512 45 0
36 4 103 60 33 192 24.0 0.966 33 0
37 11 138 76 0 0 33.2 0.420 35 0
38 9 102 76 37 0 32.9 0.665 46 1
39 2 90 68 42 0 38.2 0.503 27 1
40 4 111 72 47 207 37.1 1.390 56 1
41 3 180 64 25 70 34.0 0.271 26 0
42 7 133 84 0 0 40.2 0.696 37 0
43 7 106 92 18 0 22.7 0.235 48 0
44 9 171 110 24 240 45.4 0.721 54 1
45 7 159 64 0 0 27.4 0.294 40 0
46 0 180 66 39 0 42.0 1.893 25 1
47 1 146 56 0 0 29.7 0.564 29 0
48 2 71 70 27 0 28.0 0.586 22 0
49 7 103 66 32 0 39.1 0.344 31 1
50 7 105 0 0 0 0.0 0.305 24 0
51 1 103 80 11 82 19.4 0.491 22 0
52 1 101 50 15 36 24.2 0.526 26 0
53 5 88 66 21 23 24.4 0.342 30 0
54 8 176 90 34 300 33.7 0.467 58 1
55 7 150 66 42 342 34.7 0.718 42 0
56 1 73 50 10 0 23.0 0.248 21 0
57 7 187 68 39 304 37.7 0.254 41 1
58 0 100 88 60 110 46.8 0.962 31 0
59 0 146 82 0 0 40.5 1.781 44 0
60 0 105 64 41 142 41.5 0.173 22 0
61 2 84 0 0 0 0.0 0.304 21 0
62 8 133 72 0 0 32.9 0.270 39 1
63 5 44 62 0 0 25.0 0.587 36 0
64 2 141 58 34 128 25.4 0.699 24 0
65 7 114 66 0 0 32.8 0.258 42 1
66 5 99 74 27 0 29.0 0.203 32 0
67 0 109 88 30 0 32.5 0.855 38 1
68 2 109 92 0 0 42.7 0.845 54 0
69 1 95 66 13 38 19.6 0.334 25 0
70 4 146 85 27 100 28.9 0.189 27 0
71 2 100 66 20 90 32.9 0.867 28 1
72 5 139 64 35 140 28.6 0.411 26 0
73 13 126 90 0 0 43.4 0.583 42 1
74 4 129 86 20 270 35.1 0.231 23 0
75 1 79 75 30 0 32.0 0.396 22 0
76 1 0 48 20 0 24.7 0.140 22 0
77 7 62 78 0 0 32.6 0.391 41 0
78 5 95 72 33 0 37.7 0.370 27 0
79 0 131 0 0 0 43.2 0.270 26 1
80 2 112 66 22 0 25.0 0.307 24 0
81 3 113 44 13 0 22.4 0.140 22 0
82 2 74 0 0 0 0.0 0.102 22 0
83 7 83 78 26 71 29.3 0.767 36 0
84 0 101 65 28 0 24.6 0.237 22 0
85 5 137 108 0 0 48.8 0.227 37 1
86 2 110 74 29 125 32.4 0.698 27 0
87 13 106 72 54 0 36.6 0.178 45 0
88 2 100 68 25 71 38.5 0.324 26 0
89 15 136 70 32 110 37.1 0.153 43 1
90 1 107 68 19 0 26.5 0.165 24 0
91 1 80 55 0 0 19.1 0.258 21 0
92 4 123 80 15 176 32.0 0.443 34 0
93 7 81 78 40 48 46.7 0.261 42 0
94 4 134 72 0 0 23.8 0.277 60 1
95 2 142 82 18 64 24.7 0.761 21 0
96 6 144 72 27 228 33.9 0.255 40 0
97 2 92 62 28 0 31.6 0.130 24 0
98 1 71 48 18 76 20.4 0.323 22 0
99 6 93 50 30 64 28.7 0.356 23 0
100 1 122 90 51 220 49.7 0.325 31 1
101 1 163 72 0 0 39.0 1.222 33 1
102 1 151 60 0 0 26.1 0.179 22 0
103 0 125 96 0 0 22.5 0.262 21 0
104 1 81 72 18 40 26.6 0.283 24 0
105 2 85 65 0 0 39.6 0.930 27 0
106 1 126 56 29 152 28.7 0.801 21 0
107 1 96 122 0 0 22.4 0.207 27 0
108 4 144 58 28 140 29.5 0.287 37 0
109 3 83 58 31 18 34.3 0.336 25 0
110 0 95 85 25 36 37.4 0.247 24 1
111 3 171 72 33 135 33.3 0.199 24 1
112 8 155 62 26 495 34.0 0.543 46 1
113 1 89 76 34 37 31.2 0.192 23 0
114 4 76 62 0 0 34.0 0.391 25 0
115 7 160 54 32 175 30.5 0.588 39 1
116 4 146 92 0 0 31.2 0.539 61 1
117 5 124 74 0 0 34.0 0.220 38 1
118 5 78 48 0 0 33.7 0.654 25 0
119 4 97 60 23 0 28.2 0.443 22 0
120 4 99 76 15 51 23.2 0.223 21 0
121 0 162 76 56 100 53.2 0.759 25 1
122 6 111 64 39 0 34.2 0.260 24 0
123 2 107 74 30 100 33.6 0.404 23 0
124 5 132 80 0 0 26.8 0.186 69 0
125 0 113 76 0 0 33.3 0.278 23 1
126 1 88 30 42 99 55.0 0.496 26 1
127 3 120 70 30 135 42.9 0.452 30 0
128 1 118 58 36 94 33.3 0.261 23 0
129 1 117 88 24 145 34.5 0.403 40 1
130 0 105 84 0 0 27.9 0.741 62 1
131 4 173 70 14 168 29.7 0.361 33 1
132 9 122 56 0 0 33.3 1.114 33 1
133 3 170 64 37 225 34.5 0.356 30 1
134 8 84 74 31 0 38.3 0.457 39 0
135 2 96 68 13 49 21.1 0.647 26 0
136 2 125 60 20 140 33.8 0.088 31 0
137 0 100 70 26 50 30.8 0.597 21 0
138 0 93 60 25 92 28.7 0.532 22 0
139 0 129 80 0 0 31.2 0.703 29 0
140 5 105 72 29 325 36.9 0.159 28 0
141 3 128 78 0 0 21.1 0.268 55 0
142 5 106 82 30 0 39.5 0.286 38 0
143 2 108 52 26 63 32.5 0.318 22 0
144 10 108 66 0 0 32.4 0.272 42 1
145 4 154 62 31 284 32.8 0.237 23 0
146 0 102 75 23 0 0.0 0.572 21 0
147 9 57 80 37 0 32.8 0.096 41 0
148 2 106 64 35 119 30.5 1.400 34 0
149 5 147 78 0 0 33.7 0.218 65 0
150 2 90 70 17 0 27.3 0.085 22 0
151 1 136 74 50 204 37.4 0.399 24 0
152 4 114 65 0 0 21.9 0.432 37 0
153 9 156 86 28 155 34.3 1.189 42 1
154 1 153 82 42 485 40.6 0.687 23 0
155 8 188 78 0 0 47.9 0.137 43 1
156 7 152 88 44 0 50.0 0.337 36 1
157 2 99 52 15 94 24.6 0.637 21 0
158 1 109 56 21 135 25.2 0.833 23 0
159 2 88 74 19 53 29.0 0.229 22 0
160 17 163 72 41 114 40.9 0.817 47 1
161 4 151 90 38 0 29.7 0.294 36 0
162 7 102 74 40 105 37.2 0.204 45 0
163 0 114 80 34 285 44.2 0.167 27 0
164 2 100 64 23 0 29.7 0.368 21 0
165 0 131 88 0 0 31.6 0.743 32 1
166 6 104 74 18 156 29.9 0.722 41 1
167 3 148 66 25 0 32.5 0.256 22 0
168 4 120 68 0 0 29.6 0.709 34 0
169 4 110 66 0 0 31.9 0.471 29 0
170 3 111 90 12 78 28.4 0.495 29 0
171 6 102 82 0 0 30.8 0.180 36 1
172 6 134 70 23 130 35.4 0.542 29 1
173 2 87 0 23 0 28.9 0.773 25 0
174 1 79 60 42 48 43.5 0.678 23 0
175 2 75 64 24 55 29.7 0.370 33 0
176 8 179 72 42 130 32.7 0.719 36 1
177 6 85 78 0 0 31.2 0.382 42 0
178 0 129 110 46 130 67.1 0.319 26 1
179 5 143 78 0 0 45.0 0.190 47 0
180 5 130 82 0 0 39.1 0.956 37 1
181 6 87 80 0 0 23.2 0.084 32 0
182 0 119 64 18 92 34.9 0.725 23 0
183 1 0 74 20 23 27.7 0.299 21 0
184 5 73 60 0 0 26.8 0.268 27 0
185 4 141 74 0 0 27.6 0.244 40 0
186 7 194 68 28 0 35.9 0.745 41 1
187 8 181 68 36 495 30.1 0.615 60 1
188 1 128 98 41 58 32.0 1.321 33 1
189 8 109 76 39 114 27.9 0.640 31 1
190 5 139 80 35 160 31.6 0.361 25 1
191 3 111 62 0 0 22.6 0.142 21 0
192 9 123 70 44 94 33.1 0.374 40 0
193 7 159 66 0 0 30.4 0.383 36 1
194 11 135 0 0 0 52.3 0.578 40 1
195 8 85 55 20 0 24.4 0.136 42 0
196 5 158 84 41 210 39.4 0.395 29 1
197 1 105 58 0 0 24.3 0.187 21 0
198 3 107 62 13 48 22.9 0.678 23 1
199 4 109 64 44 99 34.8 0.905 26 1
200 4 148 60 27 318 30.9 0.150 29 1
201 0 113 80 16 0 31.0 0.874 21 0
202 1 138 82 0 0 40.1 0.236 28 0
203 0 108 68 20 0 27.3 0.787 32 0
204 2 99 70 16 44 20.4 0.235 27 0
205 6 103 72 32 190 37.7 0.324 55 0
206 5 111 72 28 0 23.9 0.407 27 0
207 8 196 76 29 280 37.5 0.605 57 1
208 5 162 104 0 0 37.7 0.151 52 1
209 1 96 64 27 87 33.2 0.289 21 0
210 7 184 84 33 0 35.5 0.355 41 1
211 2 81 60 22 0 27.7 0.290 25 0
212 0 147 85 54 0 42.8 0.375 24 0
213 7 179 95 31 0 34.2 0.164 60 0
214 0 140 65 26 130 42.6 0.431 24 1
215 9 112 82 32 175 34.2 0.260 36 1
216 12 151 70 40 271 41.8 0.742 38 1
217 5 109 62 41 129 35.8 0.514 25 1
218 6 125 68 30 120 30.0 0.464 32 0
219 5 85 74 22 0 29.0 1.224 32 1
220 5 112 66 0 0 37.8 0.261 41 1
221 0 177 60 29 478 34.6 1.072 21 1
222 2 158 90 0 0 31.6 0.805 66 1
223 7 119 0 0 0 25.2 0.209 37 0
224 7 142 60 33 190 28.8 0.687 61 0
225 1 100 66 15 56 23.6 0.666 26 0
226 1 87 78 27 32 34.6 0.101 22 0
227 0 101 76 0 0 35.7 0.198 26 0
228 3 162 52 38 0 37.2 0.652 24 1
229 4 197 70 39 744 36.7 2.329 31 0
230 0 117 80 31 53 45.2 0.089 24 0
231 4 142 86 0 0 44.0 0.645 22 1
232 6 134 80 37 370 46.2 0.238 46 1
233 1 79 80 25 37 25.4 0.583 22 0
234 4 122 68 0 0 35.0 0.394 29 0
235 3 74 68 28 45 29.7 0.293 23 0
236 4 171 72 0 0 43.6 0.479 26 1
237 7 181 84 21 192 35.9 0.586 51 1
238 0 179 90 27 0 44.1 0.686 23 1
239 9 164 84 21 0 30.8 0.831 32 1
240 0 104 76 0 0 18.4 0.582 27 0
241 1 91 64 24 0 29.2 0.192 21 0
242 4 91 70 32 88 33.1 0.446 22 0
243 3 139 54 0 0 25.6 0.402 22 1
244 6 119 50 22 176 27.1 1.318 33 1
245 2 146 76 35 194 38.2 0.329 29 0
246 9 184 85 15 0 30.0 1.213 49 1
247 10 122 68 0 0 31.2 0.258 41 0
248 0 165 90 33 680 52.3 0.427 23 0
249 9 124 70 33 402 35.4 0.282 34 0
250 1 111 86 19 0 30.1 0.143 23 0
251 9 106 52 0 0 31.2 0.380 42 0
252 2 129 84 0 0 28.0 0.284 27 0
253 2 90 80 14 55 24.4 0.249 24 0
254 0 86 68 32 0 35.8 0.238 25 0
255 12 92 62 7 258 27.6 0.926 44 1
256 1 113 64 35 0 33.6 0.543 21 1
257 3 111 56 39 0 30.1 0.557 30 0
258 2 114 68 22 0 28.7 0.092 25 0
259 1 193 50 16 375 25.9 0.655 24 0
260 11 155 76 28 150 33.3 1.353 51 1
261 3 191 68 15 130 30.9 0.299 34 0
262 3 141 0 0 0 30.0 0.761 27 1
263 4 95 70 32 0 32.1 0.612 24 0
264 3 142 80 15 0 32.4 0.200 63 0
265 4 123 62 0 0 32.0 0.226 35 1
266 5 96 74 18 67 33.6 0.997 43 0
267 0 138 0 0 0 36.3 0.933 25 1
268 2 128 64 42 0 40.0 1.101 24 0
269 0 102 52 0 0 25.1 0.078 21 0
270 2 146 0 0 0 27.5 0.240 28 1
271 10 101 86 37 0 45.6 1.136 38 1
272 2 108 62 32 56 25.2 0.128 21 0
273 3 122 78 0 0 23.0 0.254 40 0
274 1 71 78 50 45 33.2 0.422 21 0
275 13 106 70 0 0 34.2 0.251 52 0
276 2 100 70 52 57 40.5 0.677 25 0
277 7 106 60 24 0 26.5 0.296 29 1
278 0 104 64 23 116 27.8 0.454 23 0
279 5 114 74 0 0 24.9 0.744 57 0
280 2 108 62 10 278 25.3 0.881 22 0
281 0 146 70 0 0 37.9 0.334 28 1
282 10 129 76 28 122 35.9 0.280 39 0
283 7 133 88 15 155 32.4 0.262 37 0
284 7 161 86 0 0 30.4 0.165 47 1
285 2 108 80 0 0 27.0 0.259 52 1
286 7 136 74 26 135 26.0 0.647 51 0
287 5 155 84 44 545 38.7 0.619 34 0
288 1 119 86 39 220 45.6 0.808 29 1
289 4 96 56 17 49 20.8 0.340 26 0
290 5 108 72 43 75 36.1 0.263 33 0
291 0 78 88 29 40 36.9 0.434 21 0
292 0 107 62 30 74 36.6 0.757 25 1
293 2 128 78 37 182 43.3 1.224 31 1
294 1 128 48 45 194 40.5 0.613 24 1
295 0 161 50 0 0 21.9 0.254 65 0
296 6 151 62 31 120 35.5 0.692 28 0
297 2 146 70 38 360 28.0 0.337 29 1
298 0 126 84 29 215 30.7 0.520 24 0
299 14 100 78 25 184 36.6 0.412 46 1
300 8 112 72 0 0 23.6 0.840 58 0
301 0 167 0 0 0 32.3 0.839 30 1
302 2 144 58 33 135 31.6 0.422 25 1
303 5 77 82 41 42 35.8 0.156 35 0
304 5 115 98 0 0 52.9 0.209 28 1
305 3 150 76 0 0 21.0 0.207 37 0
306 2 120 76 37 105 39.7 0.215 29 0
307 10 161 68 23 132 25.5 0.326 47 1
308 0 137 68 14 148 24.8 0.143 21 0
309 0 128 68 19 180 30.5 1.391 25 1
310 2 124 68 28 205 32.9 0.875 30 1
311 6 80 66 30 0 26.2 0.313 41 0
312 0 106 70 37 148 39.4 0.605 22 0
313 2 155 74 17 96 26.6 0.433 27 1
314 3 113 50 10 85 29.5 0.626 25 0
315 7 109 80 31 0 35.9 1.127 43 1
316 2 112 68 22 94 34.1 0.315 26 0
317 3 99 80 11 64 19.3 0.284 30 0
318 3 182 74 0 0 30.5 0.345 29 1
319 3 115 66 39 140 38.1 0.150 28 0
320 6 194 78 0 0 23.5 0.129 59 1
321 4 129 60 12 231 27.5 0.527 31 0
322 3 112 74 30 0 31.6 0.197 25 1
323 0 124 70 20 0 27.4 0.254 36 1
324 13 152 90 33 29 26.8 0.731 43 1
325 2 112 75 32 0 35.7 0.148 21 0
326 1 157 72 21 168 25.6 0.123 24 0
327 1 122 64 32 156 35.1 0.692 30 1
328 10 179 70 0 0 35.1 0.200 37 0
329 2 102 86 36 120 45.5 0.127 23 1
330 6 105 70 32 68 30.8 0.122 37 0
331 8 118 72 19 0 23.1 1.476 46 0
332 2 87 58 16 52 32.7 0.166 25 0
333 1 180 0 0 0 43.3 0.282 41 1
334 12 106 80 0 0 23.6 0.137 44 0
335 1 95 60 18 58 23.9 0.260 22 0
336 0 165 76 43 255 47.9 0.259 26 0
337 0 117 0 0 0 33.8 0.932 44 0
338 5 115 76 0 0 31.2 0.343 44 1
339 9 152 78 34 171 34.2 0.893 33 1
340 7 178 84 0 0 39.9 0.331 41 1
341 1 130 70 13 105 25.9 0.472 22 0
342 1 95 74 21 73 25.9 0.673 36 0
343 1 0 68 35 0 32.0 0.389 22 0
344 5 122 86 0 0 34.7 0.290 33 0
345 8 95 72 0 0 36.8 0.485 57 0
346 8 126 88 36 108 38.5 0.349 49 0
347 1 139 46 19 83 28.7 0.654 22 0
348 3 116 0 0 0 23.5 0.187 23 0
349 3 99 62 19 74 21.8 0.279 26 0
350 5 0 80 32 0 41.0 0.346 37 1
351 4 92 80 0 0 42.2 0.237 29 0
352 4 137 84 0 0 31.2 0.252 30 0
353 3 61 82 28 0 34.4 0.243 46 0
354 1 90 62 12 43 27.2 0.580 24 0
355 3 90 78 0 0 42.7 0.559 21 0
356 9 165 88 0 0 30.4 0.302 49 1
357 1 125 50 40 167 33.3 0.962 28 1
358 13 129 0 30 0 39.9 0.569 44 1
359 12 88 74 40 54 35.3 0.378 48 0
360 1 196 76 36 249 36.5 0.875 29 1
361 5 189 64 33 325 31.2 0.583 29 1
362 5 158 70 0 0 29.8 0.207 63 0
363 5 103 108 37 0 39.2 0.305 65 0
364 4 146 78 0 0 38.5 0.520 67 1
365 4 147 74 25 293 34.9 0.385 30 0
366 5 99 54 28 83 34.0 0.499 30 0
367 6 124 72 0 0 27.6 0.368 29 1
368 0 101 64 17 0 21.0 0.252 21 0
369 3 81 86 16 66 27.5 0.306 22 0
370 1 133 102 28 140 32.8 0.234 45 1
371 3 173 82 48 465 38.4 2.137 25 1
372 0 118 64 23 89 0.0 1.731 21 0
373 0 84 64 22 66 35.8 0.545 21 0
374 2 105 58 40 94 34.9 0.225 25 0
375 2 122 52 43 158 36.2 0.816 28 0
376 12 140 82 43 325 39.2 0.528 58 1
377 0 98 82 15 84 25.2 0.299 22 0
378 1 87 60 37 75 37.2 0.509 22 0
379 4 156 75 0 0 48.3 0.238 32 1
380 0 93 100 39 72 43.4 1.021 35 0
381 1 107 72 30 82 30.8 0.821 24 0
382 0 105 68 22 0 20.0 0.236 22 0
383 1 109 60 8 182 25.4 0.947 21 0
384 1 90 62 18 59 25.1 1.268 25 0
385 1 125 70 24 110 24.3 0.221 25 0
386 1 119 54 13 50 22.3 0.205 24 0
387 5 116 74 29 0 32.3 0.660 35 1
388 8 105 100 36 0 43.3 0.239 45 1
389 5 144 82 26 285 32.0 0.452 58 1
390 3 100 68 23 81 31.6 0.949 28 0
391 1 100 66 29 196 32.0 0.444 42 0
392 5 166 76 0 0 45.7 0.340 27 1
393 1 131 64 14 415 23.7 0.389 21 0
394 4 116 72 12 87 22.1 0.463 37 0
395 4 158 78 0 0 32.9 0.803 31 1
396 2 127 58 24 275 27.7 1.600 25 0
397 3 96 56 34 115 24.7 0.944 39 0
398 0 131 66 40 0 34.3 0.196 22 1
399 3 82 70 0 0 21.1 0.389 25 0
400 3 193 70 31 0 34.9 0.241 25 1
401 4 95 64 0 0 32.0 0.161 31 1
402 6 137 61 0 0 24.2 0.151 55 0
403 5 136 84 41 88 35.0 0.286 35 1
404 9 72 78 25 0 31.6 0.280 38 0
405 5 168 64 0 0 32.9 0.135 41 1
406 2 123 48 32 165 42.1 0.520 26 0
407 4 115 72 0 0 28.9 0.376 46 1
408 0 101 62 0 0 21.9 0.336 25 0
409 8 197 74 0 0 25.9 1.191 39 1
410 1 172 68 49 579 42.4 0.702 28 1
411 6 102 90 39 0 35.7 0.674 28 0
412 1 112 72 30 176 34.4 0.528 25 0
413 1 143 84 23 310 42.4 1.076 22 0
414 1 143 74 22 61 26.2 0.256 21 0
415 0 138 60 35 167 34.6 0.534 21 1
416 3 173 84 33 474 35.7 0.258 22 1
417 1 97 68 21 0 27.2 1.095 22 0
418 4 144 82 32 0 38.5 0.554 37 1
419 1 83 68 0 0 18.2 0.624 27 0
420 3 129 64 29 115 26.4 0.219 28 1
421 1 119 88 41 170 45.3 0.507 26 0
422 2 94 68 18 76 26.0 0.561 21 0
423 0 102 64 46 78 40.6 0.496 21 0
424 2 115 64 22 0 30.8 0.421 21 0
425 8 151 78 32 210 42.9 0.516 36 1
426 4 184 78 39 277 37.0 0.264 31 1
427 0 94 0 0 0 0.0 0.256 25 0
428 1 181 64 30 180 34.1 0.328 38 1
429 0 135 94 46 145 40.6 0.284 26 0
430 1 95 82 25 180 35.0 0.233 43 1
431 2 99 0 0 0 22.2 0.108 23 0
432 3 89 74 16 85 30.4 0.551 38 0
433 1 80 74 11 60 30.0 0.527 22 0
434 2 139 75 0 0 25.6 0.167 29 0
435 1 90 68 8 0 24.5 1.138 36 0
436 0 141 0 0 0 42.4 0.205 29 1
437 12 140 85 33 0 37.4 0.244 41 0
438 5 147 75 0 0 29.9 0.434 28 0
439 1 97 70 15 0 18.2 0.147 21 0
440 6 107 88 0 0 36.8 0.727 31 0
441 0 189 104 25 0 34.3 0.435 41 1
442 2 83 66 23 50 32.2 0.497 22 0
443 4 117 64 27 120 33.2 0.230 24 0
444 8 108 70 0 0 30.5 0.955 33 1
445 4 117 62 12 0 29.7 0.380 30 1
446 0 180 78 63 14 59.4 2.420 25 1
447 1 100 72 12 70 25.3 0.658 28 0
448 0 95 80 45 92 36.5 0.330 26 0
449 0 104 64 37 64 33.6 0.510 22 1
450 0 120 74 18 63 30.5 0.285 26 0
451 1 82 64 13 95 21.2 0.415 23 0
452 2 134 70 0 0 28.9 0.542 23 1
453 0 91 68 32 210 39.9 0.381 25 0
454 2 119 0 0 0 19.6 0.832 72 0
455 2 100 54 28 105 37.8 0.498 24 0
456 14 175 62 30 0 33.6 0.212 38 1
457 1 135 54 0 0 26.7 0.687 62 0
458 5 86 68 28 71 30.2 0.364 24 0
459 10 148 84 48 237 37.6 1.001 51 1
460 9 134 74 33 60 25.9 0.460 81 0
461 9 120 72 22 56 20.8 0.733 48 0
462 1 71 62 0 0 21.8 0.416 26 0
463 8 74 70 40 49 35.3 0.705 39 0
464 5 88 78 30 0 27.6 0.258 37 0
465 10 115 98 0 0 24.0 1.022 34 0
466 0 124 56 13 105 21.8 0.452 21 0
467 0 74 52 10 36 27.8 0.269 22 0
468 0 97 64 36 100 36.8 0.600 25 0
469 8 120 0 0 0 30.0 0.183 38 1
470 6 154 78 41 140 46.1 0.571 27 0
471 1 144 82 40 0 41.3 0.607 28 0
472 0 137 70 38 0 33.2 0.170 22 0
473 0 119 66 27 0 38.8 0.259 22 0
474 7 136 90 0 0 29.9 0.210 50 0
475 4 114 64 0 0 28.9 0.126 24 0
476 0 137 84 27 0 27.3 0.231 59 0
477 2 105 80 45 191 33.7 0.711 29 1
478 7 114 76 17 110 23.8 0.466 31 0
479 8 126 74 38 75 25.9 0.162 39 0
480 4 132 86 31 0 28.0 0.419 63 0
481 3 158 70 30 328 35.5 0.344 35 1
482 0 123 88 37 0 35.2 0.197 29 0
483 4 85 58 22 49 27.8 0.306 28 0
484 0 84 82 31 125 38.2 0.233 23 0
485 0 145 0 0 0 44.2 0.630 31 1
486 0 135 68 42 250 42.3 0.365 24 1
487 1 139 62 41 480 40.7 0.536 21 0
488 0 173 78 32 265 46.5 1.159 58 0
489 4 99 72 17 0 25.6 0.294 28 0
490 8 194 80 0 0 26.1 0.551 67 0
491 2 83 65 28 66 36.8 0.629 24 0
492 2 89 90 30 0 33.5 0.292 42 0
493 4 99 68 38 0 32.8 0.145 33 0
494 4 125 70 18 122 28.9 1.144 45 1
495 3 80 0 0 0 0.0 0.174 22 0
496 6 166 74 0 0 26.6 0.304 66 0
497 5 110 68 0 0 26.0 0.292 30 0
498 2 81 72 15 76 30.1 0.547 25 0
499 7 195 70 33 145 25.1 0.163 55 1
500 6 154 74 32 193 29.3 0.839 39 0
501 2 117 90 19 71 25.2 0.313 21 0
502 3 84 72 32 0 37.2 0.267 28 0
503 6 0 68 41 0 39.0 0.727 41 1
504 7 94 64 25 79 33.3 0.738 41 0
505 3 96 78 39 0 37.3 0.238 40 0
506 10 75 82 0 0 33.3 0.263 38 0
507 0 180 90 26 90 36.5 0.314 35 1
508 1 130 60 23 170 28.6 0.692 21 0
509 2 84 50 23 76 30.4 0.968 21 0
510 8 120 78 0 0 25.0 0.409 64 0
511 12 84 72 31 0 29.7 0.297 46 1
512 0 139 62 17 210 22.1 0.207 21 0
513 9 91 68 0 0 24.2 0.200 58 0
514 2 91 62 0 0 27.3 0.525 22 0
515 3 99 54 19 86 25.6 0.154 24 0
516 3 163 70 18 105 31.6 0.268 28 1
517 9 145 88 34 165 30.3 0.771 53 1
518 7 125 86 0 0 37.6 0.304 51 0
519 13 76 60 0 0 32.8 0.180 41 0
520 6 129 90 7 326 19.6 0.582 60 0
521 2 68 70 32 66 25.0 0.187 25 0
522 3 124 80 33 130 33.2 0.305 26 0
523 6 114 0 0 0 0.0 0.189 26 0
524 9 130 70 0 0 34.2 0.652 45 1
525 3 125 58 0 0 31.6 0.151 24 0
526 3 87 60 18 0 21.8 0.444 21 0
527 1 97 64 19 82 18.2 0.299 21 0
528 3 116 74 15 105 26.3 0.107 24 0
529 0 117 66 31 188 30.8 0.493 22 0
530 0 111 65 0 0 24.6 0.660 31 0
531 2 122 60 18 106 29.8 0.717 22 0
532 0 107 76 0 0 45.3 0.686 24 0
533 1 86 66 52 65 41.3 0.917 29 0
534 6 91 0 0 0 29.8 0.501 31 0
535 1 77 56 30 56 33.3 1.251 24 0
536 4 132 0 0 0 32.9 0.302 23 1
537 0 105 90 0 0 29.6 0.197 46 0
538 0 57 60 0 0 21.7 0.735 67 0
539 0 127 80 37 210 36.3 0.804 23 0
540 3 129 92 49 155 36.4 0.968 32 1
541 8 100 74 40 215 39.4 0.661 43 1
542 3 128 72 25 190 32.4 0.549 27 1
543 10 90 85 32 0 34.9 0.825 56 1
544 4 84 90 23 56 39.5 0.159 25 0
545 1 88 78 29 76 32.0 0.365 29 0
546 8 186 90 35 225 34.5 0.423 37 1
547 5 187 76 27 207 43.6 1.034 53 1
548 4 131 68 21 166 33.1 0.160 28 0
549 1 164 82 43 67 32.8 0.341 50 0
550 4 189 110 31 0 28.5 0.680 37 0
551 1 116 70 28 0 27.4 0.204 21 0
552 3 84 68 30 106 31.9 0.591 25 0
553 6 114 88 0 0 27.8 0.247 66 0
554 1 88 62 24 44 29.9 0.422 23 0
555 1 84 64 23 115 36.9 0.471 28 0
556 7 124 70 33 215 25.5 0.161 37 0
557 1 97 70 40 0 38.1 0.218 30 0
558 8 110 76 0 0 27.8 0.237 58 0
559 11 103 68 40 0 46.2 0.126 42 0
560 11 85 74 0 0 30.1 0.300 35 0
561 6 125 76 0 0 33.8 0.121 54 1
562 0 198 66 32 274 41.3 0.502 28 1
563 1 87 68 34 77 37.6 0.401 24 0
564 6 99 60 19 54 26.9 0.497 32 0
565 0 91 80 0 0 32.4 0.601 27 0
566 2 95 54 14 88 26.1 0.748 22 0
567 1 99 72 30 18 38.6 0.412 21 0
568 6 92 62 32 126 32.0 0.085 46 0
569 4 154 72 29 126 31.3 0.338 37 0
570 0 121 66 30 165 34.3 0.203 33 1
571 3 78 70 0 0 32.5 0.270 39 0
572 2 130 96 0 0 22.6 0.268 21 0
573 3 111 58 31 44 29.5 0.430 22 0
574 2 98 60 17 120 34.7 0.198 22 0
575 1 143 86 30 330 30.1 0.892 23 0
576 1 119 44 47 63 35.5 0.280 25 0
577 6 108 44 20 130 24.0 0.813 35 0
578 2 118 80 0 0 42.9 0.693 21 1
579 10 133 68 0 0 27.0 0.245 36 0
580 2 197 70 99 0 34.7 0.575 62 1
581 0 151 90 46 0 42.1 0.371 21 1
582 6 109 60 27 0 25.0 0.206 27 0
583 12 121 78 17 0 26.5 0.259 62 0
584 8 100 76 0 0 38.7 0.190 42 0
585 8 124 76 24 600 28.7 0.687 52 1
586 1 93 56 11 0 22.5 0.417 22 0
587 8 143 66 0 0 34.9 0.129 41 1
588 6 103 66 0 0 24.3 0.249 29 0
589 3 176 86 27 156 33.3 1.154 52 1
590 0 73 0 0 0 21.1 0.342 25 0
591 11 111 84 40 0 46.8 0.925 45 1
592 2 112 78 50 140 39.4 0.175 24 0
593 3 132 80 0 0 34.4 0.402 44 1
594 2 82 52 22 115 28.5 1.699 25 0
595 6 123 72 45 230 33.6 0.733 34 0
596 0 188 82 14 185 32.0 0.682 22 1
597 0 67 76 0 0 45.3 0.194 46 0
598 1 89 24 19 25 27.8 0.559 21 0
599 1 173 74 0 0 36.8 0.088 38 1
600 1 109 38 18 120 23.1 0.407 26 0
601 1 108 88 19 0 27.1 0.400 24 0
602 6 96 0 0 0 23.7 0.190 28 0
603 1 124 74 36 0 27.8 0.100 30 0
604 7 150 78 29 126 35.2 0.692 54 1
605 4 183 0 0 0 28.4 0.212 36 1
606 1 124 60 32 0 35.8 0.514 21 0
607 1 181 78 42 293 40.0 1.258 22 1
608 1 92 62 25 41 19.5 0.482 25 0
609 0 152 82 39 272 41.5 0.270 27 0
610 1 111 62 13 182 24.0 0.138 23 0
611 3 106 54 21 158 30.9 0.292 24 0
612 3 174 58 22 194 32.9 0.593 36 1
613 7 168 88 42 321 38.2 0.787 40 1
614 6 105 80 28 0 32.5 0.878 26 0
615 11 138 74 26 144 36.1 0.557 50 1
616 3 106 72 0 0 25.8 0.207 27 0
617 6 117 96 0 0 28.7 0.157 30 0
618 2 68 62 13 15 20.1 0.257 23 0
619 9 112 82 24 0 28.2 1.282 50 1
620 0 119 0 0 0 32.4 0.141 24 1
621 2 112 86 42 160 38.4 0.246 28 0
622 2 92 76 20 0 24.2 1.698 28 0
623 6 183 94 0 0 40.8 1.461 45 0
624 0 94 70 27 115 43.5 0.347 21 0
625 2 108 64 0 0 30.8 0.158 21 0
626 4 90 88 47 54 37.7 0.362 29 0
627 0 125 68 0 0 24.7 0.206 21 0
628 0 132 78 0 0 32.4 0.393 21 0
629 5 128 80 0 0 34.6 0.144 45 0
630 4 94 65 22 0 24.7 0.148 21 0
631 7 114 64 0 0 27.4 0.732 34 1
632 0 102 78 40 90 34.5 0.238 24 0
633 2 111 60 0 0 26.2 0.343 23 0
634 1 128 82 17 183 27.5 0.115 22 0
635 10 92 62 0 0 25.9 0.167 31 0
636 13 104 72 0 0 31.2 0.465 38 1
637 5 104 74 0 0 28.8 0.153 48 0
638 2 94 76 18 66 31.6 0.649 23 0
639 7 97 76 32 91 40.9 0.871 32 1
640 1 100 74 12 46 19.5 0.149 28 0
641 0 102 86 17 105 29.3 0.695 27 0
642 4 128 70 0 0 34.3 0.303 24 0
643 6 147 80 0 0 29.5 0.178 50 1
644 4 90 0 0 0 28.0 0.610 31 0
645 3 103 72 30 152 27.6 0.730 27 0
646 2 157 74 35 440 39.4 0.134 30 0
647 1 167 74 17 144 23.4 0.447 33 1
648 0 179 50 36 159 37.8 0.455 22 1
649 11 136 84 35 130 28.3 0.260 42 1
650 0 107 60 25 0 26.4 0.133 23 0
651 1 91 54 25 100 25.2 0.234 23 0
652 1 117 60 23 106 33.8 0.466 27 0
653 5 123 74 40 77 34.1 0.269 28 0
654 2 120 54 0 0 26.8 0.455 27 0
655 1 106 70 28 135 34.2 0.142 22 0
656 2 155 52 27 540 38.7 0.240 25 1
657 2 101 58 35 90 21.8 0.155 22 0
658 1 120 80 48 200 38.9 1.162 41 0
659 11 127 106 0 0 39.0 0.190 51 0
660 3 80 82 31 70 34.2 1.292 27 1
661 10 162 84 0 0 27.7 0.182 54 0
662 1 199 76 43 0 42.9 1.394 22 1
663 8 167 106 46 231 37.6 0.165 43 1
664 9 145 80 46 130 37.9 0.637 40 1
665 6 115 60 39 0 33.7 0.245 40 1
666 1 112 80 45 132 34.8 0.217 24 0
667 4 145 82 18 0 32.5 0.235 70 1
668 10 111 70 27 0 27.5 0.141 40 1
669 6 98 58 33 190 34.0 0.430 43 0
670 9 154 78 30 100 30.9 0.164 45 0
671 6 165 68 26 168 33.6 0.631 49 0
672 1 99 58 10 0 25.4 0.551 21 0
673 10 68 106 23 49 35.5 0.285 47 0
674 3 123 100 35 240 57.3 0.880 22 0
675 8 91 82 0 0 35.6 0.587 68 0
676 6 195 70 0 0 30.9 0.328 31 1
677 9 156 86 0 0 24.8 0.230 53 1
678 0 93 60 0 0 35.3 0.263 25 0
679 3 121 52 0 0 36.0 0.127 25 1
680 2 101 58 17 265 24.2 0.614 23 0
681 2 56 56 28 45 24.2 0.332 22 0
682 0 162 76 36 0 49.6 0.364 26 1
683 0 95 64 39 105 44.6 0.366 22 0
684 4 125 80 0 0 32.3 0.536 27 1
685 5 136 82 0 0 0.0 0.640 69 0
686 2 129 74 26 205 33.2 0.591 25 0
687 3 130 64 0 0 23.1 0.314 22 0
688 1 107 50 19 0 28.3 0.181 29 0
689 1 140 74 26 180 24.1 0.828 23 0
690 1 144 82 46 180 46.1 0.335 46 1
691 8 107 80 0 0 24.6 0.856 34 0
692 13 158 114 0 0 42.3 0.257 44 1
693 2 121 70 32 95 39.1 0.886 23 0
694 7 129 68 49 125 38.5 0.439 43 1
695 2 90 60 0 0 23.5 0.191 25 0
696 7 142 90 24 480 30.4 0.128 43 1
697 3 169 74 19 125 29.9 0.268 31 1
698 0 99 0 0 0 25.0 0.253 22 0
699 4 127 88 11 155 34.5 0.598 28 0
700 4 118 70 0 0 44.5 0.904 26 0
701 2 122 76 27 200 35.9 0.483 26 0
702 6 125 78 31 0 27.6 0.565 49 1
703 1 168 88 29 0 35.0 0.905 52 1
704 2 129 0 0 0 38.5 0.304 41 0
705 4 110 76 20 100 28.4 0.118 27 0
706 6 80 80 36 0 39.8 0.177 28 0
707 10 115 0 0 0 0.0 0.261 30 1
708 2 127 46 21 335 34.4 0.176 22 0
709 9 164 78 0 0 32.8 0.148 45 1
710 2 93 64 32 160 38.0 0.674 23 1
711 3 158 64 13 387 31.2 0.295 24 0
712 5 126 78 27 22 29.6 0.439 40 0
713 10 129 62 36 0 41.2 0.441 38 1
714 0 134 58 20 291 26.4 0.352 21 0
715 3 102 74 0 0 29.5 0.121 32 0
716 7 187 50 33 392 33.9 0.826 34 1
717 3 173 78 39 185 33.8 0.970 31 1
718 10 94 72 18 0 23.1 0.595 56 0
719 1 108 60 46 178 35.5 0.415 24 0
720 5 97 76 27 0 35.6 0.378 52 1
721 4 83 86 19 0 29.3 0.317 34 0
722 1 114 66 36 200 38.1 0.289 21 0
723 1 149 68 29 127 29.3 0.349 42 1
724 5 117 86 30 105 39.1 0.251 42 0
725 1 111 94 0 0 32.8 0.265 45 0
726 4 112 78 40 0 39.4 0.236 38 0
727 1 116 78 29 180 36.1 0.496 25 0
728 0 141 84 26 0 32.4 0.433 22 0
729 2 175 88 0 0 22.9 0.326 22 0
730 2 92 52 0 0 30.1 0.141 22 0
731 3 130 78 23 79 28.4 0.323 34 1
732 8 120 86 0 0 28.4 0.259 22 1
733 2 174 88 37 120 44.5 0.646 24 1
734 2 106 56 27 165 29.0 0.426 22 0
735 2 105 75 0 0 23.3 0.560 53 0
736 4 95 60 32 0 35.4 0.284 28 0
737 0 126 86 27 120 27.4 0.515 21 0
738 8 65 72 23 0 32.0 0.600 42 0
739 2 99 60 17 160 36.6 0.453 21 0
740 1 102 74 0 0 39.5 0.293 42 1
741 11 120 80 37 150 42.3 0.785 48 1
742 3 102 44 20 94 30.8 0.400 26 0
743 1 109 58 18 116 28.5 0.219 22 0
744 9 140 94 0 0 32.7 0.734 45 1
745 13 153 88 37 140 40.6 1.174 39 0
746 12 100 84 33 105 30.0 0.488 46 0
747 1 147 94 41 0 49.3 0.358 27 1
748 1 81 74 41 57 46.3 1.096 32 0
749 3 187 70 22 200 36.4 0.408 36 1
750 6 162 62 0 0 24.3 0.178 50 1
751 4 136 70 0 0 31.2 1.182 22 1
752 1 121 78 39 74 39.0 0.261 28 0
753 3 108 62 24 0 26.0 0.223 25 0
754 0 181 88 44 510 43.3 0.222 26 1
755 8 154 78 32 0 32.4 0.443 45 1
756 1 128 88 39 110 36.5 1.057 37 1
757 7 137 90 41 0 32.0 0.391 39 0
758 0 123 72 0 0 36.3 0.258 52 1
759 1 106 76 0 0 37.5 0.197 26 0
760 6 190 92 0 0 35.5 0.278 66 1
761 2 88 58 26 16 28.4 0.766 22 0
762 9 170 74 31 0 44.0 0.403 43 1
763 9 89 62 0 0 22.5 0.142 33 0
764 10 101 76 48 180 32.9 0.171 63 0
765 2 122 70 27 0 36.8 0.340 27 0
766 5 121 72 23 112 26.2 0.245 30 0
767 1 126 60 0 0 30.1 0.349 47 1
768 1 93 70 31 0 30.4 0.315 23 0

View File

@ -0,0 +1,8 @@
-------------------------------------------------------------------------------------
loss-lr0.001-bs1-hl2-w128-Adam
Execution time: 567.2734835147858
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl0-w128-Adam
Execution time: 44.529624700546265
-------------------------------------------------------------------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -0,0 +1,537 @@
\documentclass{article}[12pt]
\usepackage{graphicx} % Required for inserting images
\usepackage{listings}
\usepackage{hyperref}
\usepackage{tabularx}
\usepackage{float}
\usepackage{subfig}
\usepackage[a4paper, left=1cm, right=1cm]{geometry}
\title{EARIN Lab 5 Report}
\author{Krzysztof Rudnicki, 307585 \\ Jakub Kliszko, 303866 }
\date{\today}
\begin{document}
\maketitle
\section{Exercise Variant 2}
Use \href{https://pytorch.org/vision/stable/generated/torchvision.datasets.MNIST.html#torchvision.datasets.MNIST}{MIST} dataset. Evaluate at least 3 different numbers/values/types of:
\begin{itemize}
\item learning rate
\item mini-batch size (including batch containing only 1 example)
\item number of hidden layers (including 0 hidden layers - linear model)
\item width (number of neurons in hidden layers)
\item optimizer type (e.g., SGD, SGD with momentum, Adam)
\end{itemize}
\section{Implementation}
Program can be ran by installing python, moving to project directory and issuing command:
\begin{lstlisting}[language=bash]
python main.py
\end{lstlisting}
Results will be displayed on three 2d scatter plots. \\
Plots Title is filled with parameters used abbreviated for space sake \\
Abbreviatons meaning:
\begin{itemize}
\item lr - Learning Rate
\item bs - Batch Size
\item hl - Number of Hidden Layers
\item w - Width
\item Adam or SGD or SGD\_Momentum - Optimizer type
\end{itemize}
Plot types:
\begin{itemize}
\item Loss value for learning step
\item Train Accuracy for epoch
\item Validation Accuracy for epoch
\end{itemize}
\begin{figure}[H]
\caption{Exemplary plot of loss for learning Step \\ lr0.001-bs64-hl1-w128-Adam }
\includegraphics[width=\textwidth]{testsResults/loss/def.png}
\centering
\end{figure}
\begin{figure}[H]
\caption{Exemplary plot of Validation Accuracy for epoch \\ lr0.001-bs64-hl1-w128-Adam }
\includegraphics[width=\textwidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs64-hl2-w64-Adam.png}
\centering
\end{figure}
\begin{figure}[H]
\caption{Exemplary plot of Train Accuracy for epoch \\ lr0.001-bs64-hl1-w128-Adam }
\includegraphics[width=\textwidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs64-hl2-w64-Adam.png}
\centering
\end{figure}
Results will be displayed and saved in the same folder as code directory for further inspection, with file name containing information about input parameters \\
Additionaly speed it took for neural network to run will be saved to results.txt along with what parameters were used \\
We decided to run 19 tests in total:
\begin{enumerate}
\item learning rate [0.1, 0.01, 0.001] (3 tests)
\item mini-batch size [1, 64, 128, 256] (4 tests)
\item number of hidden layers [0, 1, 2, 3] (4 tests)
\item width [64, 128, 256, 512, 1024] (5 tests)
\item optimizer type [SGD, SGD\_Momentum, Adam] (3 tests)
\end{enumerate}
\section{Results}
We have successfully implemented network analyzing MNIST dataset \\
\subsection{Loss Graphs}
\subsubsection{Learning Rate}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/loss/lr/def.png}
\caption{Default settings + learning rate = 0.001}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/loss/lr/loss-lr0.01-bs64-hl2-w128-Adam.png}
\caption{Default settings + learning rate = 0.01}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/loss/lr/loss-lr0.1-bs64-hl2-w128-Adam.png}
\caption{Default settings + learning rate = 0.1}
\endminipage
\end{figure}
\paragraph{Analysis} Smaller learning rate causes losses to drop near zero level faster (notice how there is a vertical drop for lower learning step for leaerning rate 0.001, later for learning rate 0.01 and never for learnig rate 0.1)
\subsubsection{Mini-Batch size}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/loss/bs/def.png}
\caption{Default settings + batching size = 64}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/loss/bs/loss-1batch.png}
\caption{Default settings + batching size = 1}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/loss/bs/loss-lr0.001-bs128-hl2-w128-Adam.png}
\caption{Default settings + batching size = 128}
\endminipage
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/loss/bs/loss-lr0.001-bs256-hl2-w128-Adam.png}
\caption{Default settings + batching size = 256}
\endminipage
\end{figure}
\paragraph{Analysis} Batching size equal to 1 makes losses seem pretty much random, increasing batch sizes increases 'flat' (smaller) loss periods between local peaks
\subsubsection{Number of Hidden Layers}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/loss/hl/hl0loss.png}
\caption{Default settings + hidden layers = 0}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/loss/hl/loss-lr0.001-bs64-hl1-w128-Adam.png}
\caption{Default settings + hidden layers = 1}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/loss/hl/def.png}
\caption{Default settings + hidden layers = 2}
\endminipage
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/loss/hl/loss-lr0.001-bs64-hl3-w128-Adam.png}
\caption{Default settings + hidden layers = 3}
\endminipage
\end{figure}
\paragraph{Analysis} Setting hidden layers to 0 again makes losses value seem random, hidden layer set to 1 provides us with later drop but longer flat periods, number of hidden layers set to 2 offeres the opposite and number of layers set to 3 seems to be a compromise between those two
\subsubsection{Width}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/loss/w/def.png}
\caption{Default settings + width = 128}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/loss/w/loss-lr0.001-bs64-hl2-w64-Adam.png}
\caption{Default settings + width = 64}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/loss/w/loss-lr0.001-bs64-hl2-w256-Adam.png}
\caption{Default settings + width = 256}
\endminipage
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/loss/w/loss-lr0.001-bs64-hl2-w512-Adam.png}
\caption{Default settings + width = 512}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/loss/w/loss-lr0.001-bs64-hl2-w1024-Adam.png}
\caption{Default settings + width = 1024}
\endminipage
\end{figure}
\paragraph{Analysis} Changing width does not seem to affect loss greatly
\subsubsection{Optimizer Type}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/loss/optimizer/def.png}
\caption{Default settings + Adam optimizer}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/loss/optimizer/loss-lr0.001-bs64-hl2-w128-SGD.png}
\caption{Default settings + learning rate = 0.01}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/loss/optimizer/loss-lr0.001-bs64-hl2-w128-SGD_Momentum.png}
\caption{Default settings + SGD\_Momentum optimizer}
\endminipage
\end{figure}
\paragraph{Analysis} Changing optimizers does not seem to affect loss greatly
\subsection{Train Accuracy Graphs}
\subsubsection{Learning Rate}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/def.png}
\caption{Default settings + learning rate = 0.001}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.01-bs64-hl2-w128-Adam.png}
\caption{Default settings + learning rate = 0.01}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.1-bs64-hl2-w128-Adam.png}
\caption{Default settings + learning rate = 0.1}
\endminipage
\end{figure}
\paragraph{Analysis} Making training accuracy smaller than 0.01 seems to be unnecessary for this dataset as it offers little to no improve in accuracy. Setting it to 0.1 on the other hand provides very low accuracy of neural network
\subsubsection{Mini-Batch size}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/def.png}
\caption{Default settings + batching size = 64}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy1batch.png}
\caption{Default settings + batching size = 1}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs128-hl2-w128-Adam.png}
\caption{Default settings + batching size = 128}
\endminipage
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs256-hl2-w128-Adam.png}
\caption{Default settings + batching size = 256}
\endminipage
\end{figure}
\paragraph{Analysis} Increasing batching size does not seem to make drastic change for train accuracy, even setting batching size to 1 offers very good (over 95 \%) accuracy
\subsubsection{Number of Hidden Layers}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs64-hl0-w128-Adam.png}
\caption{Default settings + hidden layers = 0}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs64-hl1-w128-Adam.png}
\caption{Default settings + hidden layers = 1}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/def.png}
\caption{Default settings + hidden layers = 2}
\endminipage
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs64-hl3-w128-Adam.png}
\caption{Default settings + hidden layers = 3}
\endminipage
\end{figure}
\paragraph{Analysis} Increasing hidden layers number reduces variety of train accuracy results, with hidden layers set to 0 having accuracy vary between 91 and 98 and with hidden layers equal to 3 showing much smoother graph
\subsubsection{Width}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/def.png}
\caption{Default settings + width = 128}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs64-hl2-w64-Adam.png}
\caption{Default settings + width = 64}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs64-hl2-w256-Adam.png}
\caption{Default settings + width = 256}
\endminipage
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs64-hl2-w512-Adam.png}
\caption{Default settings + width = 512}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs64-hl2-w1024-Adam.png}
\caption{Default settings + width = 1024}
\endminipage
\end{figure}
\paragraph{Analysis} Changing width does not seem to influence accuracy much
\subsubsection{Optimizer Type}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/def.png}
\caption{Default settings + Adam optimizer}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs64-hl2-w128-SGD.png}
\caption{Default settings + learning rate = 0.01}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/trainAccuracy/trainAccuracy-lr0.001-bs64-hl2-w128-SGD_Momentum.png}
\caption{Default settings + SGD\_Momentum optimizer}
\endminipage
\end{figure}
\paragraph{Analysis} Changing optimizer type does not seem to influence accuracy much
\subsection{Validation Accuracy Graphs}
Validation Accuracy Graphs look similar to Train accuracy so in order not to repeat ourselves we ommited analysis of them
\subsubsection{Learning Rate}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/def.png}
\caption{Default settings + learning rate = 0.001}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.01-bs64-hl2-w128-Adam.png}
\caption{Default settings + learning rate = 0.01}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/def.png}
\caption{Default settings + learning rate = 0.1}
\endminipage
\end{figure}
\subsubsection{Mini-Batch size}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/def.png}
\caption{Default settings + batching size = 64}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy1batch.png}
\caption{Default settings + batching size = 1}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs128-hl2-w128-Adam.png}
\caption{Default settings + batching size = 128}
\endminipage
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs256-hl2-w128-Adam.png}
\caption{Default settings + batching size = 256}
\endminipage
\end{figure}
\subsubsection{Number of Hidden Layers}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracyhl0.png}
\caption{Default settings + hidden layers = 0}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs64-hl1-w128-Adam.png}
\caption{Default settings + hidden layers = 1}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/def.png}
\caption{Default settings + hidden layers = 2}
\endminipage
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs64-hl3-w128-Adam.png}
\caption{Default settings + hidden layers = 3}
\endminipage
\end{figure}
\newpage
\subsubsection{Width}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/def.png}
\caption{Default settings + width = 128}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs64-hl2-w64-Adam.png}
\caption{Default settings + width = 64}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs64-hl2-w256-Adam.png}
\caption{Default settings + width = 256}
\endminipage
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs64-hl2-w512-Adam.png}
\caption{Default settings + width = 512}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs64-hl2-w1024-Adam.png}
\caption{Default settings + width = 1024}
\endminipage
\end{figure}
\subsubsection{Optimizer Type}
\begin{figure}[H]
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/def.png}
\caption{Default settings + Adam optimizer}
\endminipage\hfill
\minipage{0.5\textwidth}
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs64-hl2-w128-SGD.png}
\caption{Default settings + learning rate = 0.01}
\endminipage
\end{figure}
\begin{figure}[H]
\minipage{0.5\textwidth}%
\includegraphics[width=\linewidth]{testsResults/validationAccuracy/validationAccuracy-lr0.001-bs64-hl2-w128-SGD_Momentum.png}
\caption{Default settings + SGD\_Momentum optimizer}
\endminipage
\end{figure}
\subsection{Speed}
We also checked how different parameters impact speed of the neural network learning
\paragraph{Changing learning rate}
\begin{center}
\begin{tabular}{ | c | c | }
\hline
Learning rate & Execution Time [s] \\
\hline
0.001 (default) & 49.3 \\
\hline
0.01 & 53.9 \\
\hline
0.1 & 50.1 \\
\hline
\end{tabular}
\end{center}
\paragraph{Changing batch size}
\begin{center}
\begin{tabular}{ | c | c | }
\hline
Batch Size & Execution Time [s] \\
\hline
1 & 567.2 (!) \\
\hline
64 (default) & 49.3 \\
\hline
128 & 48.1 \\
\hline
256 & 42.8 \\
\hline
\end{tabular}
\end{center}
\paragraph{Changing number of hidden layers}
\begin{center}
\begin{tabular}{ | c | c | }
\hline
Hidden layers & Execution Time [s] \\
\hline
0 & 44.5 \\
\hline
1 & 48.8 \\
\hline
2 (default) & 49.3 \\
\hline
3 & 48.7 \\
\hline
\end{tabular}
\end{center}
\paragraph{Changing width}
\begin{center}
\begin{tabular}{ | c | c | }
\hline
Width & Execution Time [s] \\
\hline
64 & 46.7 \\
\hline
128 (default) & 49.3 \\
\hline
256 & 49.0 \\
\hline
512 & 52.1 \\
\hline
1024 & 73.9 \\
\hline
\end{tabular}
\end{center}
\paragraph{Changing optimizer type}
\begin{center}
\begin{tabular}{ | c | c | }
\hline
Learning rate & Execution Time [s] \\
\hline
Adam (default) & 49.3 \\
\hline
SGD & 45.1 \\
\hline
SGD Momentum & 45.5 \\
\hline
\end{tabular}
\end{center}
\paragraph{Analysis}
Two parameters that had the biggest impact on execution time was setting batch size to extremely low value (1) and increasing width (jump between 512 width and 1024 is equal to 20 seconds more execution time)
\end{document}

View File

@ -0,0 +1 @@
https://www.overleaf.com/4686517816nnvdwtftrjjx

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -0,0 +1,72 @@
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w64-Adam
Execution time: 49.23725199699402
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.1-bs64-hl2-w128-Adam
Execution time: 53.9505660533905
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.01-bs64-hl2-w128-Adam
Execution time: 50.100146532058716
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w128-Adam
Execution time: 48.90807557106018
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w128-Adam
Execution time: 49.567627906799316
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs128-hl2-w128-Adam
Execution time: 48.1188108921051
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs256-hl2-w128-Adam
Execution time: 42.80657482147217
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl1-w128-Adam
Execution time: 48.84401178359985
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w128-Adam
Execution time: 48.64533519744873
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl3-w128-Adam
Execution time: 48.79310631752014
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w64-Adam
Execution time: 46.702873945236206
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w128-Adam
Execution time: 47.38503313064575
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w256-Adam
Execution time: 49.08178782463074
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w512-Adam
Execution time: 52.18209147453308
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w1024-Adam
Execution time: 73.91722798347473
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w128-SGD
Execution time: 45.19260334968567
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w128-SGD_Momentum
Execution time: 45.510289907455444
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
loss-lr0.001-bs64-hl2-w128-Adam
Execution time: 46.77299380302429
-------------------------------------------------------------------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Some files were not shown because too many files have changed in this diff Show More