-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathReadme.txt
More file actions
272 lines (223 loc) · 10.1 KB
/
Copy pathReadme.txt
File metadata and controls
272 lines (223 loc) · 10.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
#################################################################################################################################
# AutoTile
# Version 1.0.3
# Author: ASARG
# Description: Implements the tile automata model as designed by Chalk et al.
#################################################################################################################################
# AutoTile Manual
Table of Contents
Sections
1 - Application
2 - Models Overview
3 - File I/O
4 - Feature Map
5 - Change Log
6 - Known Bugs
#############################
Section 1 - Application
## 1.1 Requirements
Required:
-Python 3+
-Install other python packages (Includes networkx, PyQt5 matplotlib) via command line with:
'pip install -r util/requirements.txt'
Optional:
## 1.2 Usage
Running:
>python3 AutoTile.py
## 1.3 Menu Overview
Main Menu
+ File
- New
- Load
- Save As
- Save History
- Load History
+ Tools
- Edit
- Rotate
- Combine
- X-Reflect
- Y-Reflect
- Slow Mode
- Time Elapsed
+ Available Moves
- List of available moves
- Next
- Previous
+ Examples
- Shape
- Model
- Input
## 1.4 Menu Functions
1.4.1 File Menu
1.4.1.1 New
This menu option opens the editor so you may begin making a new system.
1.4.1.2 Load
This menu option will prompt the user for a file and then attempt to open it.
The application will only load XML files.
1.4.1.3 Save As . . .
This menu option will prompt the user for a file name and location to log the information to. It will overwrite a file if it already exists.
1.4.1.4 Save History
This menu option saves where the assembly is currently at to a JSON file.
This menu option saves the current assembly to a JSON file.
Since some assemblies can get quite large, you have the ability to save multiple versions of the assembly at different points in time.
When prompted, enter the name of the JSON file, then enter how many steps inbetween each version of the assembly you want. If you would like only
the current assembly and no multiple versions, enter 0.
1.4.1.5 Load History
This menu option takes a JSON file and loads a system, assembly, and all steps to a certain point.
1.4.2 Tools Menu
1.4.2.1 Edit
When clicked, opens the editor with the current system loaded.
1.4.2.2 Rotate
Rotates the current system 90 degrees clockwise. Ex. a assembly where the final shape is " |" will now be "__"
1.4.2.3 Combine
Prompts the user to select a valid file and attempts to combine the system in the file with the current loaded system.
1.4.2.4 X-Reflect
"Reflects" the system across the x-axis.
1.4.2.5 Y-Reflect
"Reflects" the system across the y-axis.
1.4.2.4 Slow Mode
This is a radio button that, when selected, adds a brief delay in between steps while the play option is selected.
1.4.2.5 Time Elapsed
This is just text that shows the user how many "time steps" have occured at the current step.
1.4.3 Available Moves
This section allows a particular attachment or transition to be selected rather than a move being picked at random.
1.4.3.1 Next
When there are more moves than can be shown, you can page through the moves with 'Next'.
1.4.3.2 Prev
Similar to 'Next', you can page through the moves with 'Prev'.
1.4.4 Example
1.4.4.1 Shape
Here you will see a combo box with three options "strings," "Thin Rectangle," and "Square." Select your desired shape to begin loading an example system
1.4.4.2 Model
Here you will see a combo box with three options "Deterministic," "Non-Deterministic," and "One-Sided." Select your desired model of computation for the example to follow.
1.4.4.3 Input
Above the input box is text saying valid input types for the chosen options. Type your input in here then press the button below to load an example system.
## 1.5 Simulator Screen
Windows users, we are aware of a bug that does not let you interact with the simulator when you press play on some systems and are looking into it.
1.5.1 Simulator Area
This is where the simulation occurs. When a system with a seed is loaded, the chosen seed tile will appear here.
Tiles are displayed here with their respective label and color. It should be noted that only up to 4 characters of the label will be displayed, so it is recommended to color code should you have labels with similar beginnings.
1.5.2 Toolbar
The toolbar has five buttons which include:
-First: returns you to the first step of the assembly
-Previous: shows you the previous step of the assembly
-Play/Pause: pressing play simulates what a system would do step by step. Pause will appear when a user presses play so you may stop the simulation on a certain step. If you would like the play sequence to be slower, be sure to press the "slow mode" radio button.
-Next: shows you the next step of the assembly
-Last: takes you to the last step of the function
It should be noted that these only work if a system is loaded
1.5.3 Simulator Controls
Once a system is loaded:
-WASD will move the assembly. Holding shift with any of the WASD keys will move the assembly faster, this functions speed relates to the size of the assembly
-The mouse scroll wheel can zoom in and out, additionally + and - keys also zoom in and out
-C will "recenter" the seed of the assembly.
These hotkeys correspond to the tool bar at the top of the screen and are mapped to follow the layout respectively.
-H -First
-J -Previous
-K -Play/Pause
-L -Next
-; -Last
## 1.6 Editor Menu
1.6.1 General Settings
1.6.1.1 System Temperature
Set the system temperature here.
1.6.1.2 Freezing Check
click this button to check if your current system is a freezing system. Output is on the GUI and a .svg file called freezingcheck shows a graph with the states.
1.6.2 Add State
1.6.2.1 Color
Input a colors hexadecimal value here to set the states color
1.6.2.2 Label
Input a string here to be your states label. Note: on screen only the first 4 letters will appear from the states label
1.6.2.3 Seed
Check this box if this state can be a seed
1.6.2.4 Initial
Check this box if this state is an inital state or a state that can be used freely.
1.6.3 Add Affinity Rule
1.6.3.1 State1
The left state if its h or the top state if its v
1.6.3.2 State2
The right state if its h or the bottom state if its v
1.6.3.3 Direction
Input the direction of the affinity rule here, use h for a horizontal rule and v for a vertical rule
1.6.3.4 Glue Strength
Set the glue strength of this bond
1.6.4 Add Transition Rule
1.6.4.1 State 1
The left state if its h or the top state if its v
1.6.4.2 State 2
The right state if its h or the bottom state if its v
1.6.4.3 State 1 Final
What the left/top state transitions to if State1 and State2 are next to each other
1.6.4.4 State 2 Final
What the right/bottom state transitions to if State1 and State2 are next to each other
1.6.4.5 Direction
Input the direction of the transition rule here, use h for a horizontal rule and v for a vertical rule
#############################
Section 2 - Models Overview
2.1 Tile Automata
A Tile Automata system is a marriage between cellular automata and 2-handed self-assembly.
Systems consist of a set of monomer tile states, along with local affinities between states
denoting the strength of attraction between adjacent monomer tiles in those states. A set
of local state-change rules are included for pairs of adjacent states. Assemblies (collections
of edge-connected tiles) in the model are created from an initial set of starting assemblies
by combining previously built assemblies given sufficient binding strength from the affinity
function. Further, existing assemblies may change states of internal monomer tiles according
to any applicable state change rules.
2.1.1 Freezing
Consider a tile automata system and a directed graph G constructed as follows:
Each state type is a vertex
for any two state types, a and b, an edge from a to b exists if and only if there exists a
transition rule between them i.e. a transitions to b
The system is said to be freezing if G is acyclic and non-freezing otherwise. Intuitively, a tile
automata system is freezing if any one tile in the system can never return to a state which
it held previously. This implies that any given tile in the system can only undergo a finite
number of state transitions.
#############################
Section 3 - File I/O
3.1 XML format
The editor can create an XML file for you, but should you desire to check or build your own XML file an example simple system XML file is shown below.
EXAMPLE:
<?xml version='1.0' encoding='utf-8'?>
<System Temp="1">
<AllStates>
<State Label="A" Color="f03a47" />
<State Label="B" Color="3f88c5" />
<State Label="C" Color="323031" />
</AllStates>
<InitialStates>
<State Label="A" Color="f03a47" />
<State Label="B" Color="3f88c5" />
</InitialStates>
<SeedStates>
<State Label="A" Color="f03a47" />
</SeedStates>
<VerticalTransitions>
<Rule Label1="A'" Label2="B" Label1Final="A'" Label2Final="A" />
</VerticalTransitions>
<HorizontalTransitions>
<Rule Label1="B" Label2="B" Label1Final="B" Label2Final="C" />
</HorizontalTransitions>
<VerticalAffinities>
<Rule Label1="A" Label2="B" Strength="1" />
</VerticalAffinities>
<HorizontalAffinities>
<Rule Label1="B" Label2="B" Strength="1" />
</HorizontalAffinities>
</System>
#############################
Section 4 - Feature Map
#############################
Section 5 - Changelog
## Version 1.0
- Initial version distributed to others
## Version 1.0.1
- Update to examples along with an example on startup.
- Minor bug fixes when loading files.
## Version 1.0.2
- Implemented error checking for state transitions (making sure a state exists if we're going to transition to it).
- Fixed Python deprecation warning
## Version 1.0.3
- Fixed text alignment bug when resizing.
#############################
Section 6 - Known Bugs
- If you're display settings are zoomed in past 225%, AutoTiles GUI will break.