public void OnClicked(BaseEventData data)
    {
        var pdata = data as PointerEventData;
        var rcast = pdata.pointerCurrentRaycast;

        dataPlane.AddDatapoint(rcast.worldPosition, currentDataLabel);
        print("Clicked On " + rcast.worldPosition);
    }
Beispiel #2
0
 public void UseGAN(int generatedNumber)
 {
     dataPlane.RemovePointsOfType(1);
     for (int i = 0; i < generatedNumber; ++i)
     {
         var result = gan.EvaluateOne(null);
         dataPlane.AddDatapoint(new Vector2(result[0], result[1]), 1);
     }
 }
Beispiel #3
0
    public void UseGAN(int generatedNumber)
    {
        float[,] generated = (float[, ])modelRef.GenerateBatch(null, MathUtils.GenerateWhiteNoise(generatedNumber, -1f, 1f, modelRef.inputNoiseShape));

        dataPlane.RemovePointsOfType(1);
        for (int i = 0; i < generatedNumber; ++i)
        {
            dataPlane.AddDatapoint(new Vector2(generated[i, 0], generated[i, 1]), 1);
        }
    }
Beispiel #4
0
    public void UseGAN(int generatedNumber)
    {
        var balls = gameSystem.GetBallsStatus();

        float[,] conditionsAll = new float[generatedNumber, balls.Count * 3];

        for (int iball = 0; iball < balls.Count; ++iball)
        {
            for (int i = 0; i < generatedNumber; ++i)
            {
                conditionsAll[i, iball *3]      = balls[iball].x;
                conditionsAll[i, iball * 3 + 1] = balls[iball].y;
                conditionsAll[i, iball * 3 + 2] = balls[iball].z;
            }
        }

        float[,] generated = (float[, ])modelRef.GenerateBatch(conditionsAll, MathUtils.GenerateWhiteNoise(generatedNumber, -1, 1, modelRef.inputNoiseShape));

        dataPlane.RemovePointsOfType(1);
        dataPlane.RemovePointsOfType(0);
        for (int i = 0; i < generatedNumber; ++i)
        {
            dataPlane.AddDatapoint(new Vector2(generated[i, 0] / 2, generated[i, 1]) / 2, 1);
        }

        dataPlane.AddDatapoint(new Vector2(0.5f, 0.5f), 0);
        dataPlane.AddDatapoint(new Vector2(-0.5f, -0.5f), 0);
        dataPlane.AddDatapoint(new Vector2(0.5f, -0.5f), 0);
        dataPlane.AddDatapoint(new Vector2(-0.5f, 0.5f), 0);
        dataPlane.AddDatapoint(new Vector2(0, 0), 0);
    }