Skip to content

Commit dd19dbc

Browse files
authored
Merge pull request #434 from NetLogo/ant-adapt-resize
resize Ant Adaptation
2 parents 2c8164f + f3ae18f commit dd19dbc

2 files changed

Lines changed: 27 additions & 27 deletions

File tree

Sample Models/Games/Ant Adaptation.nlogox

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<model version="NetLogo 7.0.0-beta0" snapToGrid="true">
2+
<model version="NetLogo 7.0.0-beta1" snapToGrid="true">
33
<code><![CDATA[globals
44
[
55
is-stopped? ; flag to specify if the model is stopped
@@ -607,9 +607,23 @@ end
607607
; Copyright 2019 Uri Wilensky.
608608
; See Info tab for full copyright and license.]]></code>
609609
<widgets>
610-
<view x="245" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="-30" height="309" showTickCounter="true" patchSize="5.0" fontSize="12" wrappingAllowedY="true" width="769" tickCounterLabel="ticks" maxPycor="30" updateMode="1" maxPxcor="76" minPxcor="-76"></view>
611-
<button x="535" y="390" height="34" disableUntilTicks="false" forever="false" kind="Observer" display="Restart" width="75" sizeVersion="0">setup</button>
612-
<plot x="20" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="Population" y="430" xMin="0.0" height="205" legend="false" xMax="10.0" yMin="0.0" xAxis="Time" display="Populations by Colony Color" width="1215" sizeVersion="0">
610+
<view x="215" wrappingAllowedX="true" y="10" frameRate="30.0" minPycor="-30" height="309" showTickCounter="true" patchSize="5.0" fontSize="12" wrappingAllowedY="true" width="769" tickCounterLabel="ticks" maxPycor="30" updateMode="1" maxPxcor="76" minPxcor="-76"></view>
611+
<slider x="5" step="1" y="150" max="10" width="205" display="blue-size" height="50" min="3" direction="Horizontal" default="6.0" variable="blue-size" units="cm"></slider>
612+
<monitor x="90" precision="0" y="80" height="65" fontSize="16" width="120" display="Create Cost">blue-build-cost</monitor>
613+
<slider x="5" step="1" y="270" max="2000" width="205" display="blue-start-energy" height="50" min="300" direction="Horizontal" default="2000.0" variable="blue-start-energy" units="calories"></slider>
614+
<slider x="5" step="1" y="210" max="100" width="205" display="blue-aggression" height="50" min="0" direction="Horizontal" default="30.0" variable="blue-aggression" units="%"></slider>
615+
<monitor x="90" precision="17" y="10" height="65" fontSize="16" width="120" display="Blue Ants">count ants with [color = cyan]</monitor>
616+
<monitor x="990" precision="0" y="80" height="65" fontSize="16" width="130" display="Create Cost">red-build-cost</monitor>
617+
<monitor x="990" precision="17" y="10" height="65" fontSize="16" width="130" display="Red Ants">count ants with [color = red]</monitor>
618+
<slider x="990" step="1" y="150" max="10" width="205" display="red-size" height="50" min="3" direction="Horizontal" default="6.0" variable="red-size" units="cm"></slider>
619+
<slider x="990" step="1" y="210" max="100" width="205" display="red-aggression" height="50" min="0" direction="Horizontal" default="30.0" variable="red-aggression" units="%"></slider>
620+
<slider x="990" step="1" y="270" max="2000" width="205" display="red-start-energy" height="50" min="300" direction="Horizontal" default="2000.0" variable="red-start-energy" units="calories"></slider>
621+
<chooser x="350" y="325" height="60" variable="Add" current="1" width="170" display="Add">
622+
<choice type="string" value="Flower"></choice>
623+
<choice type="string" value="Chemical"></choice>
624+
<choice type="string" value="Vinegar"></choice>
625+
</chooser>
626+
<plot x="5" autoPlotX="true" yMax="10.0" autoPlotY="true" yAxis="Population" y="450" xMin="0.0" height="205" legend="false" xMax="10.0" yMin="0.0" width="1195" xAxis="Time" display="Populations by Colony Color">
613627
<setup></setup>
614628
<update></update>
615629
<pen interval="1.0" mode="0" display="Blue" color="-11221820" legend="true">
@@ -621,29 +635,15 @@ end
621635
<update>plot count ants with [color = red]</update>
622636
</pen>
623637
</plot>
624-
<slider x="65" step="1" y="250" max="100" display="blue-aggression" height="33" min="0" direction="Horizontal" default="30.0" variable="blue-aggression" units="%" width="172" sizeVersion="0"></slider>
625-
<slider x="1025" step="1" y="250" max="100" display="red-aggression" height="33" min="0" direction="Horizontal" default="30.0" variable="red-aggression" units="%" width="180" sizeVersion="0"></slider>
626-
<slider x="612" step=".01" y="390" max="1" display="evaporation-rate" height="33" min="0" direction="Horizontal" default="1.0" variable="evaporation-rate" units="% of pheromones" width="267" sizeVersion="0"></slider>
627-
<button x="383" y="390" height="34" disableUntilTicks="false" forever="true" kind="Observer" display="Play |&gt;" width="82" sizeVersion="0">ifelse is-stopped? != true [go] [set is-stopped? false stop]</button>
628-
<slider x="1025" step="1" y="210" max="10" display="red-size" height="33" min="3" direction="Horizontal" default="6.0" variable="red-size" units="cm" width="179" sizeVersion="0"></slider>
629-
<monitor x="120" precision="0" y="105" height="65" fontSize="16" display="Create Cost" width="120" sizeVersion="0">blue-build-cost</monitor>
630-
<monitor x="1025" precision="0" y="95" height="65" fontSize="16" display="Create Cost" width="130" sizeVersion="0">red-build-cost</monitor>
631-
<slider x="1025" step="1" y="290" max="2000" display="red-start-energy" height="33" min="300" direction="Horizontal" default="2000.0" variable="red-start-energy" units="calories" width="217" sizeVersion="0"></slider>
632-
<slider x="9" step="1" y="290" max="2000" display="blue-start-energy" height="33" min="300" direction="Horizontal" default="2000.0" variable="blue-start-energy" units="calories" width="227" sizeVersion="0"></slider>
633-
<monitor x="120" precision="17" y="40" height="65" fontSize="16" display="Blue Ants" width="120" sizeVersion="0">count ants with [color = cyan]</monitor>
634-
<monitor x="1025" precision="17" y="30" height="65" fontSize="16" display="Red Ants" width="130" sizeVersion="0">count ants with [color = red]</monitor>
635-
<slider x="65" step="1" y="211" max="10" display="blue-size" height="33" min="3" direction="Horizontal" default="6.0" variable="blue-size" units="cm" width="173" sizeVersion="0"></slider>
636-
<chooser x="385" y="337" height="45" variable="Add" current="1" display="Add" width="139" sizeVersion="0">
637-
<choice type="string" value="Flower"></choice>
638-
<choice type="string" value="Chemical"></choice>
639-
<choice type="string" value="Vinegar"></choice>
640-
</chooser>
641-
<note x="540" y="330" height="56" backgroundDark="0" fontSize="11" width="680" markdown="false" textColorLight="-16777216" backgroundLight="0">You can choose to add three things:
642-
• chemicals (pheromones) the ants follow,
643-
• flowers the ants eat, or
644-
• vinegar that erases ant chemical trails. Once selected, click on the grass to add to the game.</note>
645-
<button x="465" y="390" height="34" disableUntilTicks="false" forever="false" kind="Observer" display="Stop ||" width="70" sizeVersion="0">set is-stopped? true</button>
646-
<note x="103" y="391" height="34" backgroundDark="0" fontSize="24" width="280" markdown="false" textColorLight="-16777216" backgroundLight="0"><![CDATA[Press Play to Start |>]]></note>
638+
<note x="70" y="405" backgroundDark="0" fontSize="24" width="280" markdown="false" height="34" textColorDark="-1" textColorLight="-16777216" backgroundLight="0"><![CDATA[Press Play to Start |>]]></note>
639+
<button x="350" y="395" height="50" disableUntilTicks="false" forever="true" kind="Observer" width="85" display="Play |&gt;">ifelse is-stopped? != true [go] [set is-stopped? false stop]</button>
640+
<button x="440" y="395" height="50" disableUntilTicks="false" forever="false" kind="Observer" width="85" display="Stop ||">set is-stopped? true</button>
641+
<button x="530" y="395" height="50" disableUntilTicks="false" forever="false" kind="Observer" width="80" display="Restart">setup</button>
642+
<slider x="615" step=".01" y="395" max="1" width="267" display="evaporation-rate" height="50" min="0" direction="Horizontal" default="1.0" variable="evaporation-rate" units="% of pheromones"></slider>
643+
<note x="525" y="325" backgroundDark="0" fontSize="11" width="680" markdown="true" height="75" textColorDark="-1" textColorLight="-16777216" backgroundLight="0">You can choose to add three things:
644+
• **chemicals** (pheromones) the ants follow,
645+
• **flowers** the ants eat, or
646+
• **vinegar** that erases ant chemical trails. Once selected, click on the grass to add to the game.</note>
647647
</widgets>
648648
<info><![CDATA[## WHAT IS IT?
649649
-278 KB
Loading

0 commit comments

Comments
 (0)