-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Makefile
125 lines (108 loc) · 3.03 KB
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#
# Go parameters
#
GOCMD = go
GOBUILD = $(GOCMD) build
GOCLEAN = $(GOCMD) clean
GOTEST = $(GOCMD) test -count=1
GOGET = $(GOCMD) get
GORUN = $(GOCMD) run
# The common parameters
BINARY_NAME = goneat
OUT_DIR = out
LOG_LEVEL = -1
# The default parameters to run the experiment
DATA_DIR=./data
TRIALS_NUMBER=10
LOG_LEVEL=info
# The default targets to run
#
all: test
# The target to run double-pole non Markov experiment
#
run-cartpole-two-non-markov:
$(GORUN) executor.go -out $(OUT_DIR)/pole2_non-markov \
-context $(DATA_DIR)/pole2_non-markov.neat \
-genome $(DATA_DIR)/pole2_non-markov_startgenes \
-experiment cart_2pole_non-markov \
-trials $(TRIALS_NUMBER) \
-log_level $(LOG_LEVEL)
# The target to run double-pole Markov experiment
#
run-cartpole-two-markov:
$(GORUN) executor.go -out $(OUT_DIR)/pole2_markov \
-context $(DATA_DIR)/pole2_markov.neat \
-genome $(DATA_DIR)/pole2_markov_startgenes \
-experiment cart_2pole_markov \
-trials $(TRIALS_NUMBER) \
-log_level $(LOG_LEVEL)
# The target to run double-pole Markov experiment in parallel objective
# function evaluation mode
#
run-cartpole-two-parallel-markov:
$(GORUN) executor.go -out $(OUT_DIR)/pole2_markov_parallel \
-context $(DATA_DIR)/pole2_markov.neat \
-genome $(DATA_DIR)/pole2_markov_startgenes \
-experiment cart_2pole_markov_parallel \
-trials $(TRIALS_NUMBER) \
-log_level $(LOG_LEVEL)
# The target to run single-pole experiment
#
run-cartpole:
$(GORUN) executor.go -out $(OUT_DIR)/pole1 \
-context $(DATA_DIR)/pole1_150.neat \
-genome $(DATA_DIR)/pole1startgenes \
-experiment cart_pole \
-trials $(TRIALS_NUMBER) \
-log_level $(LOG_LEVEL)
# The target to run single-pole experiment in parallel objective
# function evaluation mode
#
run-cartpole-parallel:
$(GORUN) executor.go -out $(OUT_DIR)/pole1_parallel \
-context $(DATA_DIR)/pole1_150.neat \
-genome $(DATA_DIR)/pole1startgenes \
-experiment cart_pole_parallel \
-trials 100 \
-log_level $(LOG_LEVEL)
# The target to run disconnected XOR experiment
#
run-xor-disconnected:
$(GORUN) executor.go -out $(OUT_DIR)/xor_disconnected \
-context $(DATA_DIR)/xor.neat \
-genome $(DATA_DIR)/xordisconnectedstartgenes \
-experiment XOR \
-trials $(TRIALS_NUMBER) \
-log_level $(LOG_LEVEL)
# The target to run XOR experiment
#
run-xor:
$(GORUN) executor.go -out $(OUT_DIR)/xor \
-context $(DATA_DIR)/xor.neat \
-genome $(DATA_DIR)/xorstartgenes \
-experiment XOR \
-trials $(TRIALS_NUMBER) \
-log_level $(LOG_LEVEL)
# Run unit tests in short mode
#
test-short:
$(GOTEST) -v --short ./...
# Run all unit tests
#
test:
$(GOTEST) -v ./...
# Builds binary
#
build: | $(OUT_DIR)
$(GOBUILD) -o $(OUT_DIR)/$(BINARY_NAME) -v
# Creates the output directory for build artefacts
#
$(OUT_DIR):
mkdir -p $@
#
# Clean build targets
#
clean:
$(GOCLEAN)
rm -f $(OUT_DIR)/$(BINARY_NAME)
rm -f $(OUT_DIR)/$(BINARY_UNIX)