small change to experiment

This commit is contained in:
EddieCueto 2017-10-15 12:48:15 -05:00
parent 0908dd7788
commit 583055fde0
3 changed files with 50 additions and 24 deletions

View File

@ -2,9 +2,8 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="7b849342-5b10-423b-a282-79b16f319961" name="Default" comment=""> <list default="true" id="7b849342-5b10-423b-a282-79b16f319961" name="Default" comment="">
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/vcs.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/mcBinTree.py" afterPath="$PROJECT_DIR$/mcBinTree.py" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/mcBinTree.py" afterPath="$PROJECT_DIR$/mcBinTree.py" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/oneRunMC.py" afterPath="$PROJECT_DIR$/oneRunMC.py" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" /> <option name="TRACKING_ENABLED" value="true" />
@ -15,8 +14,8 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="makeTree.py" pinned="false" current-in-tab="false"> <file leaf-file-name="mcSim.py" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/makeTree.py"> <entry file="file://$PROJECT_DIR$/mcSim.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
@ -25,18 +24,8 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="mcBinTree.py" pinned="false" current-in-tab="true"> <file leaf-file-name="oneRunMC.py" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/mcBinTree.py"> <entry file="file://$PROJECT_DIR$/oneRunMC.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225">
<caret line="18" column="17" lean-forward="false" selection-start-line="18" selection-start-column="17" selection-end-line="18" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="README.md" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/README.md">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
@ -54,6 +43,7 @@
<option name="CHANGED_PATHS"> <option name="CHANGED_PATHS">
<list> <list>
<option value="$PROJECT_DIR$/mcBinTree.py" /> <option value="$PROJECT_DIR$/mcBinTree.py" />
<option value="$PROJECT_DIR$/oneRunMC.py" />
</list> </list>
</option> </option>
</component> </component>
@ -118,7 +108,7 @@
</list> </list>
</option> </option>
</component> </component>
<component name="RunManager" selected="Python.mcBinTree"> <component name="RunManager" selected="Python.oneRunMC">
<configuration name="mcBinTree" type="PythonConfigurationType" factoryName="Python" temporary="true"> <configuration name="mcBinTree" type="PythonConfigurationType" factoryName="Python" temporary="true">
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" /> <option name="PARENT_ENVS" value="true" />
@ -136,9 +126,31 @@
<option name="SHOW_COMMAND_LINE" value="false" /> <option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" /> <option name="EMULATE_TERMINAL" value="false" />
</configuration> </configuration>
<recent_temporary> <configuration name="oneRunMC" type="PythonConfigurationType" factoryName="Python" temporary="true">
<list size="1"> <option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
<env name="PYTHONUNBUFFERED" value="1" />
</envs>
<option name="SDK_HOME" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="IS_MODULE_SDK" value="true" />
<option name="ADD_CONTENT_ROOTS" value="true" />
<option name="ADD_SOURCE_ROOTS" value="true" />
<module name="sim_bin_tree" />
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/oneRunMC.py" />
<option name="PARAMETERS" value="" />
<option name="SHOW_COMMAND_LINE" value="false" />
<option name="EMULATE_TERMINAL" value="false" />
</configuration>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="Python.mcBinTree" /> <item index="0" class="java.lang.String" itemvalue="Python.mcBinTree" />
<item index="1" class="java.lang.String" itemvalue="Python.oneRunMC" />
</list>
<recent_temporary>
<list size="2">
<item index="0" class="java.lang.String" itemvalue="Python.oneRunMC" />
<item index="1" class="java.lang.String" itemvalue="Python.mcBinTree" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
@ -219,6 +231,22 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/mcBinTree.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="126">
<caret line="16" column="10" lean-forward="false" selection-start-line="16" selection-start-column="10" selection-end-line="16" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/mcSim.py">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/makeTree.py"> <entry file="file://$PROJECT_DIR$/makeTree.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0"> <state relative-caret-position="0">
@ -227,10 +255,10 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/mcBinTree.py"> <entry file="file://$PROJECT_DIR$/oneRunMC.py">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="225"> <state relative-caret-position="0">
<caret line="18" column="17" lean-forward="false" selection-start-line="18" selection-start-column="17" selection-end-line="18" selection-end-column="17" /> <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding /> <folding />
</state> </state>
</provider> </provider>

View File

@ -14,7 +14,6 @@ rn.seed(666)
k = 20 # depth of the tree k = 20 # depth of the tree
b = 2 # arity of the tree b = 2 # arity of the tree
T = 100 # number of steps taken by the MC T = 100 # number of steps taken by the MC
exp = 100000 # repetition of experiments
E = np.zeros(exp) E = np.zeros(exp)
M = np.zeros(exp) M = np.zeros(exp)

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python2
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """
Simulation of a random walk on a finite b-ary tree of depth k Simulation of a random walk on a finite b-ary tree of depth k