本文整理汇总了Python中Agent.Agent.randomRangeRadiumUnif方法的典型用法代码示例。如果您正苦于以下问题:Python Agent.randomRangeRadiumUnif方法的具体用法?Python Agent.randomRangeRadiumUnif怎么用?Python Agent.randomRangeRadiumUnif使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Agent.Agent
的用法示例。
在下文中一共展示了Agent.randomRangeRadiumUnif方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: exp
# 需要导入模块: from Agent import Agent [as 别名]
# 或者: from Agent.Agent import randomRangeRadiumUnif [as 别名]
def exp(self):
self.automaton.reinit(SIZE_X, SIZE_Y)
self.simulation.enableConvergenceStop()
self.automaton.disableRandomVisitingOfCells()
#self.automaton.enableCircularGrid()
self.automaton.createPopulation(POPULATION, Agent.randomRangeRadiumUnif(RMIN,rmax))
self.simulation.start(ITERATION)
示例2: Automaton
# 需要导入模块: from Agent import Agent [as 别名]
# 或者: from Agent.Agent import randomRangeRadiumUnif [as 别名]
"""
This script is used to execute the cellular automaton Chile
"""
from Automaton import Automaton
from Simulation import Simulation
from Analyzer import Analyzer
from Agent import Agent
# TODO: USE A GUI TO CONFIG THESE PARAMETERS
COLUMNS = 30
ROWS = 30
POPULATION = 100
ITERATIONS = 20
# executing the main method of the code
automaton = Automaton(ROWS, COLUMNS)
analyzer = Analyzer(automaton)
automaton.createPopulation(POPULATION, Agent.randomRangeRadiumUnif(1, 5))
simulation = Simulation(automaton, True)
simulation.start(ITERATIONS)
rankings = analyzer.getRankingOfPopulation()
print analyzer.getLinearRegressionData(False)