{"id":75,"date":"2017-03-05T21:39:08","date_gmt":"2017-03-05T18:39:08","guid":{"rendered":"https:\/\/ben.semihkiroglu.com.tr\/blog\/?p=75"},"modified":"2025-03-06T01:17:13","modified_gmt":"2025-03-05T22:17:13","slug":"php-ile-sekiz-vezir-bulmacasi","status":"publish","type":"post","link":"https:\/\/semih.kiroglu.net\/blog\/php-ile-sekiz-vezir-bulmacasi\/","title":{"rendered":"PHP ile Sekiz Vezir Bulmacas\u0131"},"content":{"rendered":"<p style=\"text-align: center;\"><strong>Hi\u00e7 PHP ile Sekiz Vezir Bulmacas\u0131 olur mu? demeyin. Oluyormu\u015f, g\u00f6rm\u00fc\u015f olduk! \ud83d\ude42<\/strong><\/p>\n<p>Merhabalar,<\/p>\n<p>Uzun zamand\u0131r blog&#8217;un update&#8217;lerine bile bakam\u0131yordum. Bug\u00fcne nasipmi\u015f hepsi. As\u0131l geli\u015f amac\u0131ma, laf\u0131 uzatmadan gelelim.<\/p>\n<p>Bu sene Machine Learning dersinde \u00e7ok k\u0131ymetli hocalar\u0131mdan Farzad KIANI&#8217;nin s\u0131n\u0131f\u0131m\u0131za verdi\u011fi Sekiz Vezir Bulmacas\u0131 projesi i\u00e7in geli\u015ftirme yapmam gerekiyordu. Ancak bu projenin internette ara\u015ft\u0131rma yap\u0131nca bulunabilecek \u00e7\u00f6z\u00fcmlerden fark\u0131 ilk vezirin bizim taraf\u0131m\u0131zdan se\u00e7ilerek bulmacan\u0131n \u00e7\u00f6z\u00fclmesiydi. \u0130\u015fin pis taraf\u0131na ka\u00e7\u0131p kestirmeden projeyi teslim etmek yerine yakla\u015f\u0131k 1 hafta kadar neredeyse do\u011fru d\u00fcr\u00fcst uyumadan kafay\u0131 hesaplama algoritmas\u0131n\u0131 yazmaya takt\u0131m. Sonu\u00e7ta yazd\u0131m da. Hocam\u0131n iste\u011fi \u00fczerine meseleyi g\u00f6rselle\u015ftirerek sizinle payla\u015fmak istedim.<\/p>\n<p><!--more--><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-77\" src=\"https:\/\/semih.kiroglu.net\/blog\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-05-21-25-58-1024x582.png\" alt=\"\" width=\"648\" height=\"368\" \/><\/p>\n<h3>Nas\u0131l yani?<\/h3>\n<p>Temelde olay\u0131n i\u015fleyi\u015fi \u015f\u00f6yle \u00e7al\u0131\u015f\u0131yor: ilk vezir nerede olursa olsun 1&#215;1 h\u00fccresinden vezir atamaya ba\u015flan\u0131yor. En belirgin sat\u0131r kural\u0131na g\u00f6re tahta kilitlenmemi\u015fse s\u00fcre\u00e7 devam ediyor. Her d\u00f6ng\u00fcn\u00fcn sonunda tahtadaki eleman say\u0131s\u0131 kontrol ediliyor ve 8 vezir yerle\u015fmemi\u015fse son vezir geri al\u0131n\u0131p tahta kontrol ediliyor. Bu \u015fekilde soldan sa\u011fa ve yukar\u0131dan a\u015fa\u011f\u0131ya olacak bi\u00e7imde vezirler yerle\u015ftiriliyor, problemli noktalar budama y\u00f6ntemiyle elenip en yak\u0131n bir sonraki i\u015fleme devam ediliyor.<\/p>\n<p>Bulamad\u0131\u011f\u0131na \u015fahit olmad\u0131m ancak bulamazsa bana bildirin l\u00fctfen, g\u00f6rmek isterim \ud83d\ude42<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-76\" src=\"https:\/\/semih.kiroglu.net\/blog\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-05-21-22-10-1024x577.png\" alt=\"\" width=\"648\" height=\"365\" \/><\/p>\n<h3>\u015e\u00fckranlar goes to&#8230; \ud83d\ude42<\/h3>\n<p>Bu projeyi vererek kafay\u0131 bize yedirten k\u0131ymetli Farzad KIANI hocama ve algoritman\u0131n son a\u015famalar\u0131nda t\u0131kanm\u0131\u015fken imdad\u0131ma yeti\u015fen eni\u015ftem (abim gibidir, kafalar kar\u0131\u015fmas\u0131n diye eni\u015ftem yaz\u0131yorum :)) Samet G\u00dcZEL&#8217;e \u015f\u00fckranlar\u0131m\u0131 sunuyorum.<\/p>\n<p>Ayr\u0131ca yeri gelmi\u015fken eklemek isterim; bu t\u00fcrde tuhaf projeler olduk\u00e7a Github hesab\u0131ma ekleyip oralar\u0131 da buralar\u0131 da canland\u0131rmay\u0131 d\u00fc\u015f\u00fcn\u00fcyorum. Tabi elimden ne kadar gelir, me\u00e7hul \ud83d\ude42<\/p>\n<p>Bu projeyle ilgili ya\u015fad\u0131\u011f\u0131n\u0131z sorunlarda veya sormak istedi\u011finiz herhangi bir \u015fey olursa yorum atmaktan veya e-posta g\u00f6ndermekten \u00e7ekinmeyin l\u00fctfen.<\/p>\n<p>Github:\u00a0<a href=\"https:\/\/github.com\/semihkiroglu\/SekizVezirPHP\">https:\/\/github.com\/semihkiroglu\/SekizVezirPHP<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-78\" src=\"https:\/\/semih.kiroglu.net\/blog\/wp-content\/uploads\/2017\/03\/Screenshot-from-2017-03-05-21-25-30-1024x585.png\" alt=\"\" width=\"648\" height=\"370\" \/><\/p>\n<p>Ba\u015fka bir mevzuda g\u00f6r\u00fc\u015fmek dile\u011fiyle, selamlar \ud83d\ude42<\/p>\n<p>Semih KIRO\u011eLU<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi\u00e7 PHP ile Sekiz Vezir Bulmacas\u0131 olur mu? demeyin. Oluyormu\u015f, g\u00f6rm\u00fc\u015f olduk! \ud83d\ude42 Merhabalar, Uzun zamand\u0131r blog&#8217;un update&#8217;lerine bile bakam\u0131yordum. Bug\u00fcne nasipmi\u015f hepsi. As\u0131l geli\u015f amac\u0131ma, laf\u0131 uzatmadan gelelim. Bu sene Machine Learning dersinde \u00e7ok k\u0131ymetli hocalar\u0131mdan Farzad KIANI&#8217;nin s\u0131n\u0131f\u0131m\u0131za verdi\u011fi Sekiz Vezir Bulmacas\u0131 projesi i\u00e7in geli\u015ftirme yapmam gerekiyordu. Ancak bu projenin internette ara\u015ft\u0131rma yap\u0131nca bulunabilecek \u00e7\u00f6z\u00fcmlerden fark\u0131 ilk vezirin bizim taraf\u0131m\u0131zdan se\u00e7ilerek bulmacan\u0131n \u00e7\u00f6z\u00fclmesiydi. \u0130\u015fin pis taraf\u0131na ka\u00e7\u0131p kestirmeden projeyi teslim etmek yerine yakla\u015f\u0131k 1 hafta kadar neredeyse do\u011fru d\u00fcr\u00fcst uyumadan kafay\u0131 hesaplama algoritmas\u0131n\u0131 yazmaya takt\u0131m. Sonu\u00e7ta yazd\u0131m da&#8230;. <\/p>\n","protected":false},"author":1,"featured_media":77,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[7,3],"tags":[8,9,11,18,23,32,33,34,36,41],"class_list":["post-75","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-php","category-web-teknolojileri","tag-algorithm","tag-algoritmasi","tag-bulmacasi","tag-eight","tag-in","tag-php","tag-problem","tag-queen","tag-sekiz","tag-vezir"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/posts\/75","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":0,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/posts\/75\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/categories?post=75"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/semih.kiroglu.net\/blog\/wp-json\/wp\/v2\/tags?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}