Skip to content

Commit c14372a

Browse files
committed
[UI] updates to Sample Models/Social Science models to fit new UI widget
sizes
2 parents 39d2e7b + cbac16a commit c14372a

4 files changed

Lines changed: 167 additions & 167 deletions

File tree

Sample Models/Social Science/Language Change.nlogox

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -239,35 +239,23 @@ end
239239
; Copyright 2007 Uri Wilensky.
240240
; See Info tab for full copyright and license.]]></code>
241241
<widgets>
242-
<view x="375" wrappingAllowedX="false" y="10" frameRate="30.0" minPycor="-45" height="368" showTickCounter="true" patchSize="4.0" fontSize="10" wrappingAllowedY="false" width="368" tickCounterLabel="ticks" maxPycor="45" updateMode="1" maxPxcor="45" minPxcor="-45"></view>
243-
<plot x="5" autoPlotX="true" yMax="1.0" autoPlotY="true" yAxis="State" y="365" xMin="0.0" height="120" legend="false" xMax="100.0" yMin="0.0" xAxis="Time" display="Mean state of language users in the network" width="360" sizeVersion="0">
244-
<setup></setup>
245-
<update></update>
246-
<pen interval="1.0" mode="0" display="default" color="-16777216" legend="true">
247-
<setup></setup>
248-
<update>plot mean [state] of nodes</update>
249-
</pen>
250-
</plot>
251-
<button x="10" y="10" height="33" disableUntilTicks="false" forever="false" kind="Observer" display="setup" width="95" sizeVersion="0">setup</button>
252-
<button x="226" y="10" height="34" disableUntilTicks="true" forever="true" kind="Observer" width="140" sizeVersion="0">go</button>
253-
<button x="110" y="10" height="33" disableUntilTicks="false" forever="true" kind="Observer" display="layout" width="95" sizeVersion="0">layout
254-
display</button>
255-
<button x="10" y="160" height="34" disableUntilTicks="true" forever="false" kind="Observer" display="reset states" width="193" sizeVersion="0">reset-nodes</button>
256-
<button x="226" y="80" height="34" disableUntilTicks="false" forever="true" kind="Observer" width="140" sizeVersion="0">highlight</button>
257-
<output x="375" y="415" height="70" fontSize="14" width="375"></output>
258-
<slider x="10" step="1" y="45" max="100" display="num-nodes" height="33" min="2" direction="Horizontal" default="100.0" variable="num-nodes" width="195" sizeVersion="0"></slider>
259-
<slider x="10" step="1" y="81" max="100" display="percent-grammar-1" height="33" min="0" direction="Horizontal" default="60.0" variable="percent-grammar-1" units="%" width="194" sizeVersion="0"></slider>
260-
<chooser x="225" y="150" height="45" variable="update-algorithm" current="0" display="update-algorithm" width="140" sizeVersion="0">
242+
<view x="390" wrappingAllowedX="false" y="10" frameRate="30.0" minPycor="-45" height="368" showTickCounter="true" patchSize="4.0" fontSize="10" wrappingAllowedY="false" width="375" tickCounterLabel="ticks" maxPycor="45" updateMode="1" maxPxcor="45" minPxcor="-45"></view>
243+
<button x="10" y="10" height="35" disableUntilTicks="false" forever="false" kind="Observer" width="95" display="setup">setup</button>
244+
<button x="10" y="220" height="35" disableUntilTicks="true" forever="false" kind="Observer" width="193" display="reset states">reset-nodes</button>
245+
<slider x="10" step="1" y="55" max="100" width="195" display="num-nodes" height="50" min="2" direction="Horizontal" default="100.0" variable="num-nodes"></slider>
246+
<slider x="10" step="1" y="115" max="100" width="194" display="percent-grammar-1" height="50" min="0" direction="Horizontal" default="60.0" variable="percent-grammar-1" units="%"></slider>
247+
<slider x="225" step="0.0050" y="370" max="0.05" width="150" display="alpha" height="50" min="0" direction="Horizontal" default="0.025" variable="alpha"></slider>
248+
<button x="10" y="175" height="35" disableUntilTicks="true" forever="false" kind="Observer" width="194" display="redistribute grammars">redistribute-grammars</button>
249+
<slider x="225" step="0.05" y="210" max="1" width="150" display="threshold-val" height="50" min="0" direction="Horizontal" default="0.3" variable="threshold-val"></slider>
250+
<switch x="225" y="270" height="40" on="true" variable="sink-state-1?" width="150" display="sink-state-1?"></switch>
251+
<switch x="225" y="320" height="40" on="true" variable="logistic?" width="150" display="logistic?"></switch>
252+
<button x="225" y="50" height="35" disableUntilTicks="true" forever="false" kind="Observer" width="150" display="go once">go</button>
253+
<chooser x="225" y="140" height="60" variable="update-algorithm" current="0" width="150" display="update-algorithm">
261254
<choice type="string" value="individual"></choice>
262255
<choice type="string" value="threshold"></choice>
263256
<choice type="string" value="reward"></choice>
264257
</chooser>
265-
<slider x="225" step="0.0050" y="320" max="0.05" display="alpha" height="33" min="0" direction="Horizontal" default="0.025" variable="alpha" width="140" sizeVersion="0"></slider>
266-
<button x="10" y="120" height="35" disableUntilTicks="true" forever="false" kind="Observer" display="redistribute grammars" width="194" sizeVersion="0">redistribute-grammars</button>
267-
<slider x="225" step="0.05" y="205" max="1" display="threshold-val" height="33" min="0" direction="Horizontal" default="0.3" variable="threshold-val" width="140" sizeVersion="0"></slider>
268-
<switch x="225" y="245" height="33" on="true" variable="sink-state-1?" display="sink-state-1?" width="140" sizeVersion="0"></switch>
269-
<switch x="225" y="284" height="33" on="true" variable="logistic?" display="logistic?" width="140" sizeVersion="0"></switch>
270-
<note x="15" y="205" height="151" textColorLight="-16777216" fontSize="10" width="195" markdown="false">* threshold-val and sink state only
258+
<note x="10" y="265" backgroundDark="0" fontSize="10" width="200" markdown="false" height="151" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">* threshold-val and sink state only
271259
apply for "individual" and "threshold"
272260
updating algorithms
273261

@@ -277,7 +265,19 @@ built-in bias towards grammar 1
277265
* alpha only applies to the
278266
"reward" updating algorithm
279267
and when logistic? is on</note>
280-
<button x="226" y="45" height="34" disableUntilTicks="true" forever="false" kind="Observer" display="go once" width="140" sizeVersion="0">go</button>
268+
<button x="225" y="90" height="35" disableUntilTicks="false" forever="true" kind="Observer" width="150">highlight</button>
269+
<button x="110" y="10" height="35" disableUntilTicks="false" forever="true" kind="Observer" width="95" display="layout">layout
270+
display</button>
271+
<output x="390" y="390" height="70" fontSize="14" width="375"></output>
272+
<button x="225" y="10" height="35" disableUntilTicks="true" forever="true" kind="Observer" width="150">go</button>
273+
<plot x="15" autoPlotX="true" yMax="1.0" autoPlotY="true" yAxis="State" y="435" xMin="0.0" height="127" legend="false" xMax="100.0" yMin="0.0" width="360" xAxis="Time" display="Mean state of language users in the network">
274+
<setup></setup>
275+
<update></update>
276+
<pen interval="1.0" mode="0" display="default" color="-16777216" legend="true">
277+
<setup></setup>
278+
<update>plot mean [state] of nodes</update>
279+
</pen>
280+
</plot>
281281
</widgets>
282282
<info><![CDATA[## WHAT IS IT?
283283

Sample Models/Social Science/Prisoner's Dilemma/Prisoner's Dilemma N-Person Iterated.nlogox

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,26 @@ end
310310
; Copyright 2002 Uri Wilensky.
311311
; See Info tab for full copyright and license.]]></code>
312312
<widgets>
313-
<view x="303" wrappingAllowedX="true" y="8" frameRate="30.0" minPycor="-10" height="424" showTickCounter="true" patchSize="20.0" fontSize="10" wrappingAllowedY="true" width="424" tickCounterLabel="ticks" maxPycor="10" updateMode="1" maxPxcor="10" minPxcor="-10"></view>
314-
<button x="8" y="19" height="43" disableUntilTicks="false" forever="false" kind="Observer" width="78" sizeVersion="0">setup</button>
315-
<plot x="8" autoPlotX="true" yMax="5.0" autoPlotY="true" yAxis="Ave Payoff" y="330" xMin="0.0" height="217" legend="true" xMax="10.0" yMin="0.0" xAxis="Iterations" display="Average Payoff" width="284" sizeVersion="0">
313+
<view x="650" wrappingAllowedX="true" y="8" frameRate="30.0" minPycor="-10" height="424" showTickCounter="true" patchSize="20.0" fontSize="10" wrappingAllowedY="true" width="424" tickCounterLabel="ticks" maxPycor="10" updateMode="1" maxPxcor="10" minPxcor="-10"></view>
314+
<note x="347" y="22" backgroundDark="0" fontSize="11" width="236" markdown="false" height="153" textColorDark="-1" textColorLight="-16777216" backgroundLight="0"> PAYOFF:
315+
Partner
316+
Turtle C D
317+
-------------------------
318+
C 3 0
319+
-------------------------
320+
D 5 1
321+
-------------------------
322+
(C = Cooperate, D = Defect)</note>
323+
<slider x="8" step="1" y="80" max="20" width="150" display="n-random" height="50" min="0" direction="Horizontal" default="10.0" variable="n-random"></slider>
324+
<slider x="169" step="1" y="208" max="20" width="165" display="n-unknown" height="50" min="0" direction="Horizontal" default="10.0" variable="n-unknown"></slider>
325+
<slider x="8" step="1" y="144" max="20" width="150" display="n-cooperate" height="50" min="0" direction="Horizontal" default="10.0" variable="n-cooperate"></slider>
326+
<slider x="8" step="1" y="208" max="20" width="150" display="n-defect" height="50" min="0" direction="Horizontal" default="10.0" variable="n-defect"></slider>
327+
<slider x="169" step="1" y="80" max="20" width="165" display="n-tit-for-tat" height="50" min="0" direction="Horizontal" default="10.0" variable="n-tit-for-tat"></slider>
328+
<slider x="169" step="1" y="144" max="20" width="165" display="n-unforgiving" height="50" min="0" direction="Horizontal" default="10.0" variable="n-unforgiving"></slider>
329+
<button x="8" y="27" height="43" disableUntilTicks="false" forever="false" kind="Observer" width="84">setup</button>
330+
<button x="101" y="27" height="43" disableUntilTicks="true" forever="true" kind="Observer" width="111">go</button>
331+
<button x="221" y="27" height="44" disableUntilTicks="true" forever="false" kind="Observer" width="113" display="go once">go</button>
332+
<plot x="8" autoPlotX="true" yMax="5.0" autoPlotY="true" yAxis="Ave Payoff" y="266" xMin="0.0" height="224" legend="true" xMax="10.0" yMin="0.0" width="634" xAxis="Iterations" display="Average Payoff">
316333
<setup></setup>
317334
<update></update>
318335
<pen interval="1.0" mode="0" display="random" color="-7500403" legend="true">
@@ -340,23 +357,6 @@ end
340357
<update><![CDATA[if num-unknown-games > 0 [ plot unknown-score / (num-unknown-games) ]]]></update>
341358
</pen>
342359
</plot>
343-
<button x="85" y="19" height="43" disableUntilTicks="true" forever="true" kind="Observer" width="89" sizeVersion="0">go</button>
344-
<slider x="8" step="1" y="61" max="20" display="n-random" height="33" min="0" direction="Horizontal" default="10.0" variable="n-random" width="126" sizeVersion="0"></slider>
345-
<slider x="8" step="1" y="94" max="20" display="n-cooperate" height="33" min="0" direction="Horizontal" default="10.0" variable="n-cooperate" width="126" sizeVersion="0"></slider>
346-
<slider x="8" step="1" y="127" max="20" display="n-defect" height="33" min="0" direction="Horizontal" default="10.0" variable="n-defect" width="126" sizeVersion="0"></slider>
347-
<slider x="133" step="1" y="61" max="20" display="n-tit-for-tat" height="33" min="0" direction="Horizontal" default="10.0" variable="n-tit-for-tat" width="126" sizeVersion="0"></slider>
348-
<slider x="133" step="1" y="94" max="20" display="n-unforgiving" height="33" min="0" direction="Horizontal" default="10.0" variable="n-unforgiving" width="126" sizeVersion="0"></slider>
349-
<slider x="133" step="1" y="127" max="20" display="n-unknown" height="33" min="0" direction="Horizontal" default="10.0" variable="n-unknown" width="126" sizeVersion="0"></slider>
350-
<note x="12" y="175" height="140" textColorLight="-16777216" fontSize="11" width="236" markdown="false"> PAYOFF:
351-
Partner
352-
Turtle C D
353-
-------------------------
354-
C 3 0
355-
-------------------------
356-
D 5 1
357-
-------------------------
358-
(C = Cooperate, D = Defect)</note>
359-
<button x="174" y="19" height="44" disableUntilTicks="true" forever="false" kind="Observer" display="go once" width="86" sizeVersion="0">go</button>
360360
</widgets>
361361
<info><![CDATA[## WHAT IS IT?
362362

0 commit comments

Comments
 (0)