Skip to content

Commit

Permalink
Renamed CognitiveArchitecture to Agent
Browse files Browse the repository at this point in the history
  • Loading branch information
ktnyt committed Jun 19, 2015
1 parent ccbed73 commit 0bc4e9b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
18 changes: 9 additions & 9 deletions python/brica1/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
module.py
=====
This module contains the class `Module` and `CognitiveArchitecture` which serve
This module contains the class `Module` and `Agent` which serve
as abstractions for distict areas in the brain or sub-regions of those areas.
`Module`s together with `Component`s are collectively reffered to as `Unit`s.
"""

__all__ = ["Module", "CognitiveArchitecture"]
__all__ = ["Module", "Agent"]

import copy
import numpy
Expand Down Expand Up @@ -171,23 +171,23 @@ def remove_component(self, id):

del self.components[id]

class CognitiveArchitecture(Module):
class Agent(Module):
"""
A `CognitiveArchitecture` is a `Module` which serves as a top-level
A `Agent` is a `Module` which serves as a top-level
container for functional `Module`s.
"""

def __init__(self, scheduler):
""" Create a new `CognitiveArchitecture` instance.
""" Create a new `Agent` instance.
Args:
scheduler (Scheduler): a scheduler to schedule `Component` firing.
Returns:
CognitiveArchitecture: a new `CognitiveArchitecture` instance.
Agent: a new `Agent` instance.
"""
super(CognitiveArchitecture, self).__init__()
super(Agent, self).__init__()
self.scheduler = scheduler

def step(self):
Expand All @@ -204,7 +204,7 @@ def step(self):
return self.scheduler.step()

def update_scheduler(self):
""" Udpate the `Scheduler` with this `CognitiveArchitecture`.
""" Udpate the `Scheduler` with this `Agent`.
Args:
None.
Expand All @@ -228,5 +228,5 @@ def add_submodule(self, id, submodule):
"""

super(CognitiveArchitecture, self).add_submodule(id, submodule)
super(Agent, self).add_submodule(id, submodule)
self.update_scheduler()
4 changes: 2 additions & 2 deletions python/brica1/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def update(self, ca):
""" Update the `Scheduler` for given cognitive architecture (ca)
Args:
ca (CognitiveArchitecture): a target to update.
ca (Agent): a target to update.
Returns:
None.
Expand Down Expand Up @@ -179,7 +179,7 @@ def update(self, ca):
""" Update the `Scheduler` for given cognitive architecture (ca)
Args:
ca (CognitiveArchitecture): a target to update.
ca (Agent): a target to update.
Returns:
None.
Expand Down
16 changes: 8 additions & 8 deletions python/tests/scheduler_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def setUp(self):

def test_set(self):
s = brica1.VirtualTimeSyncScheduler(1.0)
ca = brica1.CognitiveArchitecture(s)
ca = brica1.Agent(s)

zero = numpy.zeros(3, dtype=numpy.short)
v = numpy.array([1, 2, 3], dtype=numpy.short)
Expand Down Expand Up @@ -60,7 +60,7 @@ def test_set(self):

def test_component(self):
s = brica1.VirtualTimeSyncScheduler(1.0)
ca = brica1.CognitiveArchitecture(s)
ca = brica1.Agent(s)

zero = numpy.zeros(3, dtype=numpy.short)
v = numpy.array([1, 2, 3], dtype=numpy.short)
Expand Down Expand Up @@ -117,7 +117,7 @@ def test_component(self):

def test_module(self):
s = brica1.VirtualTimeSyncScheduler(1.0)
ca = brica1.CognitiveArchitecture(s)
ca = brica1.Agent(s)

zero = numpy.zeros(3, dtype=numpy.short)
v = numpy.array([1, 2, 3], dtype=numpy.short)
Expand Down Expand Up @@ -208,7 +208,7 @@ def test_module(self):

def test_nested(self):
s = brica1.VirtualTimeSyncScheduler(1.0)
ca = brica1.CognitiveArchitecture(s)
ca = brica1.Agent(s)

zero = numpy.zeros(3, dtype=numpy.short)
v = numpy.array([1, 2, 3], dtype=numpy.short)
Expand Down Expand Up @@ -344,7 +344,7 @@ def setUp(self):

def test_set(self):
s = brica1.VirtualTimeScheduler()
ca = brica1.CognitiveArchitecture(s)
ca = brica1.Agent(s)

zero = numpy.zeros(3, dtype=numpy.short)
v = numpy.array([1, 2, 3], dtype=numpy.short)
Expand Down Expand Up @@ -382,7 +382,7 @@ def test_set(self):

def test_component(self):
s = brica1.VirtualTimeScheduler()
ca = brica1.CognitiveArchitecture(s)
ca = brica1.Agent(s)

zero = numpy.zeros(3, dtype=numpy.short)
v = numpy.array([1, 2, 3], dtype=numpy.short)
Expand Down Expand Up @@ -498,7 +498,7 @@ def test_component(self):

def test_module(self):
s = brica1.VirtualTimeScheduler()
ca = brica1.CognitiveArchitecture(s)
ca = brica1.Agent(s)

zero = numpy.zeros(3, dtype=numpy.short)
v = numpy.array([1, 2, 3], dtype=numpy.short)
Expand Down Expand Up @@ -672,7 +672,7 @@ def test_module(self):

def test_nested(self):
s = brica1.VirtualTimeScheduler()
ca = brica1.CognitiveArchitecture(s)
ca = brica1.Agent(s)

zero = numpy.zeros(3, dtype=numpy.short)
v = numpy.array([1, 2, 3], dtype=numpy.short)
Expand Down

0 comments on commit 0bc4e9b

Please sign in to comment.