Package model.MARK_II.connectTypes

Examples of model.MARK_II.connectTypes.RegionToRegionRectangleConnect


        final int LAYER_4_CELLS_PER_COLUMN = 4;
        final int LAYER_3_CELLS_PER_COLUMN = 1;
        double percentMinimumOverlap = 20;
        int desiredLocalActivity = 3;

        Neocortex neocortex = new Neocortex(new Region("root", 60, 60, LAYER_4_CELLS_PER_COLUMN, percentMinimumOverlap, desiredLocalActivity), new RegionToRegionRectangleConnect());
        neocortex.addToCurrentRegion(new Rectangle(new Point(0, 0), new Point(29, 60)), new Region("A", 125, 125, LAYER_4_CELLS_PER_COLUMN, percentMinimumOverlap, desiredLocalActivity), 0, 0);
        neocortex.addToCurrentRegion(new Rectangle(new Point(30, 0), new Point(60, 60)), new Region("B", 125, 125, LAYER_4_CELLS_PER_COLUMN, percentMinimumOverlap, desiredLocalActivity), 0, 0);

        neocortex.changeCurrentRegionTo("A");
        neocortex.addToCurrentRegion(new Rectangle(new Point(0, 0), new Point(125, 125)), new Region("C", 125, 125, LAYER_3_CELLS_PER_COLUMN, percentMinimumOverlap, desiredLocalActivity), 0, 0);
View Full Code Here


        this.gson = new Gson();
    }

    private NervousSystem constructConnectedNervousSystem() {
        Neocortex unconnectedNeocortex = new Neocortex(new Region("V1", 4, 4,
                4, 50, 3), new RegionToRegionRectangleConnect());

        LGN unconnectedLGN = new LGN(new Region("LGN", 8, 8, 1, 50, 3));

        Retina unconnectedRetina = new Retina(66, 66);

        NervousSystem nervousSystem = new NervousSystem(unconnectedNeocortex,
                unconnectedLGN, unconnectedRetina);

        // connect OldRetina to LGN
        Retina retina = nervousSystem.getPNS().getSNS().getRetina();
        LGN LGN = nervousSystem.getCNS().getBrain().getThalamus().getLGN();
        AbstractSensorCellsToRegionConnect opticNerve = new SensorCellsToRegionRectangleConnect();
        opticNerve.connect(retina.getVisionCells(), LGN.getRegion(), 0, 0);

        // connect LGN to very small part of V1 Region of Neocortex
        Neocortex neocortex = nervousSystem.getCNS().getBrain().getCerebrum()
                .getCerebralCortex().getNeocortex();
        AbstractRegionToRegionConnect regionToRegionConnect = new RegionToRegionRectangleConnect();
        regionToRegionConnect.connect(LGN.getRegion(),
                neocortex.getCurrentRegion(), 0, 0);

        return nervousSystem;
    }
View Full Code Here

        }
    }

    public void test_getBottomLayerXYAxisLength() {
        Region bottomLayer = new Region("bottomLayer", 25, 35, 1, 50, 1);
        AbstractRegionToRegionConnect connectType = new RegionToRegionRectangleConnect();
        connectType.connect(bottomLayer, this.region, 0, 0);

        Dimension bottomLayerDimensions = this.region
                .getBottomLayerXYAxisLength();
        assertEquals(25, bottomLayerDimensions.width);
        assertEquals(35, bottomLayerDimensions.height);
View Full Code Here

    private SpatialPooler spatialPooler;

    public void setUp() {
        this.parentRegion = new Region("parentRegion", 8, 8, 4, 20, 3);
        Region childRegion = new Region("childRegion", 66, 66, 4, 20, 3);
        AbstractRegionToRegionConnect connectType = new RegionToRegionRectangleConnect();
        connectType.connect(childRegion, this.parentRegion, 2, 2);

        this.spatialPooler = new SpatialPooler(this.parentRegion);
        this.spatialPooler.setLearningState(true);
    }
View Full Code Here

        // Now really check by building a very small Region with one Column
        // with 1 connected Synapse & test. Then add another connected Synapse
        // & test.
        Region parentRegion2 = new Region("parentRegion2", 1, 1, 1, 50, 1);
        Region childRegion2 = new Region("childRegion2", 5, 5, 1, 50, 3);
        AbstractRegionToRegionConnect connectType = new RegionToRegionRectangleConnect();
        connectType.connect(childRegion2, parentRegion2, 0, 0);
        // parentRegion2 has 1 Column with 25 synapses.

        Column[][] columns = parentRegion2.getColumns();
        Set<Synapse<Cell>> synapses = columns[0][0].getProximalSegment()
                .getSynapses();
View Full Code Here

TOP

Related Classes of model.MARK_II.connectTypes.RegionToRegionRectangleConnect

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.