Chapter IV
Chapter IV
Chapter IV
SYSTEM DESIGN
and data of a system to satisfy the specified requirements. It can be considered as the
intermediate stage between System Analysis and Product Development where the
analyses that have been made in the previous chapter are now visualized in detail. The
application comprises of four sections: user interface design, physical design, data
a desktop or a web application. The user interface will allow users to use the application
easily. As the developed program is a neural network agent that is trained to play Atari
games, no user interface is created in this study. The result of the training will be shown
used in development process to ensure that the created application runs without problems.
Table
40
41
4.1 and 4.2 below show respectively the software and hardware requirements to runs this
application.
No Field Description
1 Operating System Windows 10 Education
2 Programming Language Python
3 Program Development JetBrains PyCharm Professional 2019.2.1
Google Colaboratory
4 Documentation Microsoft Word 2019
No Field Description
1 Processor Minimum requirement: Intel Core i series
2 Memory Minimum requirement: 12GB of RAM
3 Monitor Minimum requirement: Resolution 1280x720
4 Hard Drive Minimum requirement: Free space of 100 MB
train the agent to be excel in a specific game environment. Two checkpoint (.h5) data are
generated, one is to save the training weights for every iteration and the other is created
when highest average score is calculated. The last two data generated by the system are
the
42
preprocessed environment file, which is an image format file (.png), and a video file of the
game episode. Table 4.3 below depict the data design for the application.
classes of a system. Classes here are classes in Object Oriented Programming context
which displayed with its attributes, methods, and relations with other classes. Class
Two classes, DQ_Network and Agent, are used in this application. The further
a. DQ_Network Class
for the agent. There exist nine properties to define this class which are:
o total_action
The total_action stands for a number of actions that the agent could take in the
specific environment.
44
o learning_rate
o batch_size
o discount_factor
o input_dimension
column, channel) that defines the game’s frame size. It will be utilized as an
o load_path
The load_path is a variable which hold a string that contains the checkpoint’s
file path.
o checkpoint
The checkpoint holds the Keras’s checkpoint function to save the agent’s
o model
The model holds the main neural network model that is initialized by
build_network() function.
o target_model
The model holds the target neural network model that is initialized by
build_network() function.
o init
o build_network
The build_network method is the core method of this class where the neural
network is configured.
o train
The train method holds the main algorithm of the Deep Q Network with
Experience Replay.
o predict
The predict method returns the prediction result of the neural network.
46
b. Agent Class
The Agent Class represent the agent with the neural networks. Agent stores the
learning is defined in this function. There exist eleven properties that is created
o total_action
The total_action stands for a number of actions that the agent could take in the
specific environment.
o learning_rate
o input_dimension
column, channel) that defines the game’s frame size. It will be utilized as an
o discount_factor
o epsilon
The epsilon stores a floating-point value between 0 and 1 to determine the agent
o epsilon_decay
o load_path
The load_path is a variable which hold a string that contains the checkpoint’s
file path.
o batch_size
o memory_size
The memory_size defines the memory size that the agent could hold.
o memory
o training_count
o init
o store_transition
The store_transition method is utilized to save the taken action result in the
agent’ memory.
o choose_action
o update_epsilon
mechanism.
o sample_exp_batch
experiences from the agent’s memory that will be feeds into the neural
network.
o max_q
The max_q method is utilized to get the maximum q value for testing purposes.
o learn
The learn method is the method where the network will be run and the Q-