-
Notifications
You must be signed in to change notification settings - Fork 1
/
fncActions.m
32 lines (29 loc) · 946 Bytes
/
fncActions.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function A = fncActions(idxA)
% Action selection function
% -------------------------------------------------------------------------
%
% Function :
% [A] = fncActions(idxA)
%
% Inputs :
% idxA - Action index
%
% Outputs :
% A - Action to be taken given the input index
%
% -------------------------------------------------------------------------
% Author : P.C. Luteijn
% email : [email protected]
% Date : July 2017
% Comment : Fuction returns an action given a specific action index.
%
% -------------------------------------------------------------------------
% Action list
ACTION = [ 0, -1; ... % Left
1, 0; ... % Up
0, 1; ... % Right
-1, 0; ... % Down
0, 0]; % Stay
% Return selected action given the action index
A = ACTION(idxA,:);
end