Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iotamak-ihm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SMAC
AMAK
Python
IoTAMAK
iotamak-ihm
Commits
75ba410a
Commit
75ba410a
authored
3 years ago
by
Sebastien GOYON
Browse files
Options
Downloads
Patches
Plain Diff
Delete agent.py
parent
e73527b8
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uploads/current_experiment/ant/agent.py
+0
-42
0 additions, 42 deletions
uploads/current_experiment/ant/agent.py
with
0 additions
and
42 deletions
uploads/current_experiment/ant/agent.py
deleted
100644 → 0
+
0
−
42
View file @
e73527b8
import
random
import
sys
from
iotAmak.agent
import
Agent
class
Ant
(
Agent
):
def
__init__
(
self
,
identifier
:
int
,
broker_ip
:
str
):
self
.
x
=
250
self
.
y
=
250
super
().
__init__
(
identifier
,
broker_ip
)
def
on_initialization
(
self
)
->
None
:
pass
def
on_cycle_begin
(
self
)
->
None
:
pass
def
on_perceive
(
self
)
->
None
:
pass
def
on_decide
(
self
)
->
None
:
pass
def
on_act
(
self
)
->
None
:
self
.
x
+=
random
.
randint
(
-
5
,
+
5
)
self
.
y
+=
random
.
randint
(
-
5
,
+
5
)
def
on_cycle_end
(
self
)
->
None
:
pass
def
send_metric
(
self
):
metric
=
super
(
Ant
,
self
).
send_metric
()
metric
[
"
x
"
]
=
self
.
x
metric
[
"
y
"
]
=
self
.
y
return
metric
if
__name__
==
'
__main__
'
:
a
=
Ant
(
int
(
sys
.
argv
[
1
]),
str
(
sys
.
argv
[
2
]))
a
.
run
()
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment