Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
EMADL2CPP
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
10
Issues
10
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
monticore
EmbeddedMontiArc
generators
EMADL2CPP
Commits
0c8d4322
Commit
0c8d4322
authored
Jun 01, 2019
by
Nicola Gatto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust tests
parent
5591fe2d
Pipeline
#148388
failed with stages
in 1 minute and 10 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
src/test/resources/target_code/gluon/reinforcementModel/cartpole/reinforcement_learning/strategy.py
...orcementModel/cartpole/reinforcement_learning/strategy.py
+4
-4
src/test/resources/target_code/gluon/reinforcementModel/mountaincar/reinforcement_learning/strategy.py
...ementModel/mountaincar/reinforcement_learning/strategy.py
+4
-4
src/test/resources/target_code/gluon/reinforcementModel/torcs/reinforcement_learning/strategy.py
...inforcementModel/torcs/reinforcement_learning/strategy.py
+4
-4
No files found.
src/test/resources/target_code/gluon/reinforcementModel/cartpole/reinforcement_learning/strategy.py
View file @
0c8d4322
...
...
@@ -34,14 +34,14 @@ class StrategyBuilder(object):
return
EpsilonGreedyStrategy
(
eps
=
epsilon
,
number_of_actions
=
action_dim
[
0
],
decay_method
=
decay
)
elif
method
==
'
uhlenbeck_ornstein
'
:
elif
method
==
'
ornstein_uhlenbeck
'
:
assert
action_dim
is
not
None
assert
action_low
is
not
None
assert
action_high
is
not
None
assert
mu
is
not
None
assert
theta
is
not
None
assert
sigma
is
not
None
return
UhlenbeckOrnstein
Strategy
(
return
OrnsteinUhlenbeck
Strategy
(
action_dim
,
action_low
,
action_high
,
epsilon
,
mu
,
theta
,
sigma
,
decay
)
else
:
...
...
@@ -124,7 +124,7 @@ class GreedyStrategy(BaseStrategy):
pass
class
UhlenbeckOrnstein
Strategy
(
BaseStrategy
):
class
OrnsteinUhlenbeck
Strategy
(
BaseStrategy
):
"""
Ornstein-Uhlenbeck process: dxt = theta * (mu - xt) * dt + sigma * dWt
where Wt denotes the Wiener process.
...
...
@@ -140,7 +140,7 @@ class UhlenbeckOrnsteinStrategy(BaseStrategy):
sigma
=
.
3
,
decay
=
NoDecay
()
):
super
(
UhlenbeckOrnstein
Strategy
,
self
).
__init__
()
super
(
OrnsteinUhlenbeck
Strategy
,
self
).
__init__
()
self
.
eps
=
eps
self
.
cur_eps
=
eps
...
...
src/test/resources/target_code/gluon/reinforcementModel/mountaincar/reinforcement_learning/strategy.py
View file @
0c8d4322
...
...
@@ -34,14 +34,14 @@ class StrategyBuilder(object):
return
EpsilonGreedyStrategy
(
eps
=
epsilon
,
number_of_actions
=
action_dim
[
0
],
decay_method
=
decay
)
elif
method
==
'
uhlenbeck_ornstein
'
:
elif
method
==
'
ornstein_uhlenbeck
'
:
assert
action_dim
is
not
None
assert
action_low
is
not
None
assert
action_high
is
not
None
assert
mu
is
not
None
assert
theta
is
not
None
assert
sigma
is
not
None
return
UhlenbeckOrnstein
Strategy
(
return
OrnsteinUhlenbeck
Strategy
(
action_dim
,
action_low
,
action_high
,
epsilon
,
mu
,
theta
,
sigma
,
decay
)
else
:
...
...
@@ -124,7 +124,7 @@ class GreedyStrategy(BaseStrategy):
pass
class
UhlenbeckOrnstein
Strategy
(
BaseStrategy
):
class
OrnsteinUhlenbeck
Strategy
(
BaseStrategy
):
"""
Ornstein-Uhlenbeck process: dxt = theta * (mu - xt) * dt + sigma * dWt
where Wt denotes the Wiener process.
...
...
@@ -140,7 +140,7 @@ class UhlenbeckOrnsteinStrategy(BaseStrategy):
sigma
=
.
3
,
decay
=
NoDecay
()
):
super
(
UhlenbeckOrnstein
Strategy
,
self
).
__init__
()
super
(
OrnsteinUhlenbeck
Strategy
,
self
).
__init__
()
self
.
eps
=
eps
self
.
cur_eps
=
eps
...
...
src/test/resources/target_code/gluon/reinforcementModel/torcs/reinforcement_learning/strategy.py
View file @
0c8d4322
...
...
@@ -34,14 +34,14 @@ class StrategyBuilder(object):
return
EpsilonGreedyStrategy
(
eps
=
epsilon
,
number_of_actions
=
action_dim
[
0
],
decay_method
=
decay
)
elif
method
==
'
uhlenbeck_ornstein
'
:
elif
method
==
'
ornstein_uhlenbeck
'
:
assert
action_dim
is
not
None
assert
action_low
is
not
None
assert
action_high
is
not
None
assert
mu
is
not
None
assert
theta
is
not
None
assert
sigma
is
not
None
return
UhlenbeckOrnstein
Strategy
(
return
OrnsteinUhlenbeck
Strategy
(
action_dim
,
action_low
,
action_high
,
epsilon
,
mu
,
theta
,
sigma
,
decay
)
else
:
...
...
@@ -124,7 +124,7 @@ class GreedyStrategy(BaseStrategy):
pass
class
UhlenbeckOrnstein
Strategy
(
BaseStrategy
):
class
OrnsteinUhlenbeck
Strategy
(
BaseStrategy
):
"""
Ornstein-Uhlenbeck process: dxt = theta * (mu - xt) * dt + sigma * dWt
where Wt denotes the Wiener process.
...
...
@@ -140,7 +140,7 @@ class UhlenbeckOrnsteinStrategy(BaseStrategy):
sigma
=
.
3
,
decay
=
NoDecay
()
):
super
(
UhlenbeckOrnstein
Strategy
,
self
).
__init__
()
super
(
OrnsteinUhlenbeck
Strategy
,
self
).
__init__
()
self
.
eps
=
eps
self
.
cur_eps
=
eps
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment