Example #1
0
    public void ActivateFunction(FTYPE fTYPE)
    {
        if (activeFunctions == null)
        {
            activeFunctions = new List <FTYPE>();
        }
        if (!activeFunctions.Contains(fTYPE))
        {
            activeFunctions.Add(fTYPE);
        }

        ActivationFunctions.ActivateFunction(activeFunctions);
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        artgallery = this;


        //FIXME PROTOTYPE set a random seed value here instead and save that value for a play session
        seed = testerID; //testerID
        //seed = UnityEngine.Random.Range(0, 9999999);
        UnityEngine.Random.InitState(seed);


        //RunExternalScript("test.bat", "");

        // Build the game room
        GameObject roomProp = Instantiate(roomObject) as GameObject;

        gameRoom = roomProp.GetComponent <Room>();
        gameRoom.SetArtGallery(this);

        // starting functions
        availableFunctions = new List <FTYPE> {
            FTYPE.ID, FTYPE.TANH, FTYPE.SQUAREWAVE, FTYPE.GAUSS, FTYPE.SINE, FTYPE.SAWTOOTH, FTYPE.ABSVAL
        };
        if (activeFunctions == null)
        {
            activeFunctions = new List <FTYPE>();
            ActivateFunction(FTYPE.ID);
        }


        //activate functions
        // Testing: activating all functions
        //ActivationFunctions.ActivateAllFunctions();
        ActivationFunctions.ActivateFunction(activeFunctions);

        // build the lobby
        lobby = new RoomConfiguration(STARTING_NUM_ARTWORKS);
        room  = lobby;
        gameRoom.InitializeRoom(GetImagesFromArtworks(room.GetArtworks()));

        List <Artwork> artToSave = new List <Artwork>();


        lobby.SetSculptures(gameRoom.GetSculptures());
    }
Example #3
0
    void Start()
    {
        EvolutionaryHistory.InitializeEvolutionaryHistory();
        EvolutionaryHistory.archetypes[0] = new TWEANNGenotype(4, 3, 0).Nodes;
        width = height = 64;
        //ActivationFunctions.ActivateAllFunctions();
        collectedFunctions = new List <FTYPE> {
            FTYPE.ID, FTYPE.TANH, FTYPE.SQUAREWAVE, FTYPE.GAUSS, FTYPE.SINE
        };
        activeFunctions = new List <FTYPE> {
            FTYPE.ID, FTYPE.GAUSS, FTYPE.SINE
        };
        ActivationFunctions.ActivateFunction(activeFunctions);

        leftRenderer  = leftQuad.GetComponent <Renderer>();
        rightRenderer = rightQuad.GetComponent <Renderer>();
        leftImg       = new Texture2D(width, height, TextureFormat.ARGB32, true);
        rightImg      = new Texture2D(width, height, TextureFormat.ARGB32, true);
        BuildArtworks();
    }