Der STRG + V Thread

Dieses Thema im Forum "Spiele" wurde erstellt von KiramasuHi, 18. Juli 2018.

Schlagworte:
  1. Vegannes

    Vegannes
    Spender

    Beiträge:
    19
    Zustimmungen:
    46
    Punkte für Erfolge:
    118
  2. Bonka_Shroob501

    Bonka_Shroob501
    Premium

    Beiträge:
    91
    Zustimmungen:
    147
    Punkte für Erfolge:
    138

    fun-fact: ist ein game von 2007 und das theme ist die erste phase vom final boss
     
  3. GamingJerks

    GamingJerks
    Premium

    Beiträge:
    117
    Zustimmungen:
    203
    Punkte für Erfolge:
    148
  4. Vegannes

    Vegannes
    Spender

    Beiträge:
    19
    Zustimmungen:
    46
    Punkte für Erfolge:
    118
    Datum des Erwerbs der HZB
     
  5. CubePixels

    CubePixels
    Spieler

    Beiträge:
    4
    Zustimmungen:
    4
    Punkte für Erfolge:
    103
    private int x, y, width, height, health, currenthealth, speed;
    private boolean isHit = false, containsCoins;
    private int value = 0;

    public Asteroid() {
    int ratio = CustomMath.limit((int)(Math.random()*200) + 50, 50, 200);
    int rnd = (int)(Math.random()*10) + 1;
    if(rnd % 5 == 0) {
    containsCoins = true;

    } else {
    containsCoins = false;
    }
    width = ratio;
    height = ratio;

    health = (width * height) /200;
    currenthealth = health;
    speed = (int)(Math.random()*6) +1;
    x = CustomMath.limit((int)(Math.random()* Gui.widh), width+Player.with/2, Gui.widh-width-Player.with/2);
    y = -height;
    if(containsCoins) {
    value = (width * height) / 400;

    }


    }

    public int getX() {
    return x;
    }

    public void setX(int x) {
    this.x = x;
    }

    public int getY() {
    return y;
    }

    public void setY(int y) {
    this.y = y;
    }

    public int getWidth() {
    return width;
    }

    public void setWidth(int width) {
    this.width = width;
    }

    public int getHeight() {
    return height;
    }

    public void setHeight(int height) {
    this.height = height;
    }

    public int getHealth() {
    return health;
    }

    public void setHealth(int health) {
    this.health = health;
    }

    public boolean isContainsCoins() {
    return containsCoins;
    }

    public void setContainsCoins(boolean containsCoins) {
    this.containsCoins = containsCoins;
    }

    public boolean isHit() {
    return isHit;
    }

    public void setHit(boolean isHit) {
    this.isHit = isHit;
    }

    public int getValue() {
    return value;
    }

    public void setValue(int value) {
    this.value = value;
    }

    public int getSpeed() {
    return speed;
    }

    public void setSpeed(int speed) {
    this.speed = speed;
    }

    public int getCurrenthealth() {
    return currenthealth;
    }

    public void setCurrenthealth(int currenthealth) {
    this.currenthealth = currenthealth;
    }

    }
     
    adnxnz gefällt das.
  6. IWantYourSister

    IWantYourSister
    Premium

    Beiträge:
    41
    Zustimmungen:
    114
    Punkte für Erfolge:
    128
  7. Vegannes

    Vegannes
    Spender

    Beiträge:
    19
    Zustimmungen:
    46
    Punkte für Erfolge:
    118
  8. GamingJerks

    GamingJerks
    Premium

    Beiträge:
    117
    Zustimmungen:
    203
    Punkte für Erfolge:
    148
  9. adnxnz

    adnxnz
    Spieler

    Beiträge:
    33
    Zustimmungen:
    259
    Punkte für Erfolge:
    153
    from sklearn import datasets
    from sklearn.model_selection import train_test_split
    from sklearn.metrics import accuracy_score
    from scipy.spatial import distance
    import random

    def euc(a, b):
    return distance.euclidean(a, b)

    class scrappyKNN():
    def fit(self, X_train, Y_train):
    self.X_train = X_train
    self.Y_train = Y_train

    def predict(self, X_test):
    predictions = []
    for row in X_test:
    label = self.closest(row)
    predictions.append(label)

    return predictions

    def closest(self, row):
    best_dist = euc(row, self.X_train[0])
    best_index = 0

    for i in range(1, len(self.X_train)):
    dist = euc(row, self.X_train)
    if dist < best_dist:
    best_dist = dist
    best_index = i

    return self.Y_train[best_index]

    iris = datasets.load_iris()

    X = iris.data
    Y = iris.target

    X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.5)

    my_classifier = scrappyKNN()
    my_classifier.fit(X_train, Y_train)

    predictions = my_classifier.predict(X_test)
    print(predictions)
    print(accuracy_score(Y_test, predictions))

    -------------------------------------------------------------------------------------------

    Falls sich jemand wundert was das ist, das ist ein Programm welches in der Python Programmiersprache geschrieben wurde, und es basiert auf AI (Artificial Intelligence, uebersetzt: Kuenstliche Intelligenz)
     
  10. IWantYourSister

    IWantYourSister
    Premium

    Beiträge:
    41
    Zustimmungen:
    114
    Punkte für Erfolge:
    128