本文整理匯總了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)