Guest User

Untitled

a guest
Jan 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. # 4 Transformations: Her iterasyonda en fazla biri gerceklesebilir
  2. # 4: reflection(Yansima)
  3. # en kotu noktayi en kotu olmaktan cikar ama en iyi noktadan iyi olmasin
  4. # points[-1] en kotu nokta, points[0] en kotu nokta
  5. xr = centroid + self.alpha * (centroid - points[-1]) # Yansima nokta guncelleme kurali
  6. score_r = fn(*list(xr)) # fonksiyon ciktisini guncelle
  7. print "R Score", score_r
  8. if results[0] < score_r <results[-1]: # en kotu noktadan iyi, en iyi noktadan kotu olmasi gerek
  9. points[-1] = xr # oyleyse noktayi guncelle
  10. print "Reflection sonrasi noktalar", points
  11. continue # en fazla bir donusum gerceklesebilir
Add Comment
Please, Sign In to add comment