Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Xholon Metamind - Fish and Cat
<?xml version="1.0" encoding="UTF-8"?>
<!--Xholon Workbook http://www.primordion.com/Xholon/gwt/ MIT License, Copyright (C) Ken Webb, Thu Jul 08 2021 13:07:33 GMT-0400 (Eastern Daylight Time)-->
<XholonWorkbook>
<Notes><![CDATA[
Xholon
------
Title: Xholon Metamind - Fish and Cat
Description:
Url: http://www.primordion.com/Xholon/gwt/
InternalName: b62ce78ae53e14b6b2cc690aad7f0b47
Keywords:
My Notes
--------
July 8, 2021
Xholon Metamind - Fish and Cat
based on: "Island Game 5", and "Xholon Metamind - some concepts"
Ken Webb
July 8, 2021
see my file: IslandGame_CommonModel01.txt
]]></Notes>
<_-.XholonClass>
<PhysicalSystem/>
<!-- the following is from Chad's ecore model, with my (KSW) additions -->
<_-.metamind>
<Model>
<!-- KSW: I will create separate models for a Fish and for a Cat -->
<Fish/>
<Cat/>
</Model>
<Module/>
<Buffer/>
<DeclarativeMemory superClass="Module"/>
<ProceduralMemory superClass="Module"/>
<Motor superClass="Module"/>
<!-- KSW: I have changed the name of this module from Visual to the more generic Perception -->
<!--<Visual superClass="Module"/>-->
<Perception superClass="Module"/>
<Rule/>
<Chunk/>
<Condition/>
<!--<Environment>
KSW: DO NOT SPECIFY this Xholon metamind class; GridGenerator will create it
KSW: the environment consists of a 3x3 grid consisting of 9 grid cells; the Fish or Cat occupies the central grid cell
</Environment>-->
<Action/>
<WorkingMemory superClass="Module"/>
<Slot/>
</_-.metamind>
<!-- KSW: DO NOT SPECIFY these two Xholon classes; GridGenerator will create them
<Space/>
<FieldRow/>
-->
<!-- GridGenerator requires that these NOT have a superclass such as IslandGridCell -->
<!--<IslandGridCell>-->
<OceanCell/> <!-- OceanCell is the default -->
<LandCell/>
<CoastCell/>
<!--</IslandGridCell>-->
</_-.XholonClass>
<xholonClassDetails>
<!--<Block>
<port name="height" connector="Height"/>
</Block>-->
<!-- The "A Standard Model of the Mind" paper suggests these colors -->
<WorkingMemory><Color>brown</Color></WorkingMemory>
<DeclarativeMemory><Color>red</Color></DeclarativeMemory>
<ProceduralMemory><Color>blue</Color></ProceduralMemory>
<!--<Visual><Color>yellow</Color></Visual>-->
<Perception><Color>yellow</Color></Perception>
<Motor><Color>green</Color></Motor>
<Model><Color>white</Color></Model>
</xholonClassDetails>
<PhysicalSystem>
<GridGenerator rows="3" cols="3" gridType="Gvt" names="Environment,FieldRow,OceanCell" columnColor="171c8f" gridViewerParams="PhysicalSystem/Environment,20,Island Viewer,true" cellsCanSupplyOwnColor="true">
<Attribute_String>TODO CellPattern ?</Attribute_String>
</GridGenerator>
<!--<Environment>
KSW: for now, I am unable to place Space inside the Environment, because of various Xholon constraints
</Environment>-->
</PhysicalSystem>
<Blockbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var a = 123;
var b = 456;
var c = a * b;
if (console) {
console.log(c);
}
//# sourceURL=Blockbehavior.js
]]></Blockbehavior>
<Heightbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
var myHeight, testing;
var beh = {
postConfigure: function() {
testing = Math.floor(Math.random() * 10);
myHeight = this.cnode.parent();
},
act: function() {
myHeight.println(this.toString());
},
toString: function() {
return "testing:" + testing;
}
}
//# sourceURL=Heightbehavior.js
]]></Heightbehavior>
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
$wnd.xh.Brickbehavior = function Brickbehavior() {}
$wnd.xh.Brickbehavior.prototype.postConfigure = function() {
this.brick = this.cnode.parent();
this.iam = " red brick";
};
$wnd.xh.Brickbehavior.prototype.act = function() {
this.brick.println("I am a" + this.iam);
};
//# sourceURL=Brickbehavior.js
]]></Brickbehavior>
<Brickbehavior implName="org.primordion.xholon.base.Behavior_gwtjs"><![CDATA[
console.log("I'm another brick behavior");
]]></Brickbehavior>
<SvgClient><Attribute_String roleName="svgUri"><![CDATA[data:image/svg+xml,
<svg width="100" height="50" xmlns="http://www.w3.org/2000/svg">
<g>
<title>Environment</title>
<rect id="PhysicalSystem/Environment" fill="#98FB98" height="50" width="50" x="25" y="0"/>
<g>
<title>OceanCell</title>
<rect id="PhysicalSystem/Environment/FieldRow/OceanCell" fill="#6AB06A" height="50" width="10" x="80" y="0"/>
</g>
</g>
</svg>
]]></Attribute_String><Attribute_String roleName="setup">${MODELNAME_DEFAULT},${SVGURI_DEFAULT}</Attribute_String></SvgClient>
</XholonWorkbook>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment