コード例 #1
0
        private void PreviewMapClicked()
        {
            MoveToPointPreview preview = FindObjectOfType <MoveToPointPreview>();

            if (_previewSelectionMap.Value_ID >= 0)
            {
                preview.SelectedGeneId = _previewSelectionMap.Value_ID;
            }

            preview.GetComponent <PeriodicUpdate>()?.MarkToTrigger();

            Debug.Log("PreviewClicked");
            ParetoGeneBank.Genome gi = GeneBankManager.Inst.GetGenomeByID(_previewSelectionMap.Value_ID);
            if (gi == null)
            {
                return;
            }

            MultiLayerPerception mlp = new MultiLayerPerception(MoveSimParams.GetDefault().mlpShape, Layer.FusedActivation.Relu6);

            mlp.LoadWeights(gi._weights.ToArray());
            _nnDisplay._TestMLP = mlp;
            _nnDisplay.MarkDirtyRepaint();
            Debug.Log("SetNNDisp");
        }
コード例 #2
0
        private void ParentMapClicked()
        {
            MoveToPointPreview preview = FindObjectOfType <MoveToPointPreview>();

            if (_parentSelectionMap.Value_ID >= 0)
            {
                preview.SelectedGeneId = _parentSelectionMap.Value_ID;
            }

            _weightsOfSelected = _genebank.GetGenomeByID(_parentSelectionMap.Value_ID)._weights;
            preview.GetComponent <PeriodicUpdate>()?.MarkToTrigger();
            Debug.Log("ParentClicked");
        }