Passed
Push — master ( dddec0...ebb310 )
by Grega
01:13
created

run_rs   A

Complexity

Total Complexity 0

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 0
1
# encoding=utf8
2
# This is temporary fix to import module from parent folder
3
# It will be removed when package is published on PyPI
4
import sys
5
sys.path.append('../')
6
# End of fix
7
8
from NiaPy.task import StoppingTask
9
from NiaPy.benchmarks import Sphere
10
from NiaPy.algorithms.other import RandomSearch
11
12
for i in range(1):
13
    task = StoppingTask(D=5, nGEN=5000, benchmark=Sphere())
14
    algo = RandomSearch()
15
    best = algo.run(task=task)
16
    print(best)
17