Ad
  • Custom User Avatar

    Thanks you for your numbers, really appreciate it. Seems I still have a long way to go. I barely manage to get 128 attempts before my code timeouts on a 1000x1000 board.
    Around 400x400 is my current limit where my code at least sometimes gets a solution before time is up. Probably going to rewrite it entirely.

    I intentionally formulated my question oversimplified to not spoiler anyone. I figured the number of attempts would be a good indicator for estimating how much more efficient one's code has still to get.

  • Custom User Avatar

    Yes, you can describe one of possible approaches this way, but this description is rather oversimplified and actual difficulty is in finding the next constellation to try.

    For a 1000x1000 board my solution performs 400-600 checks in the most common case, sometimes it's 2k-4k checks (roughly 1 of 5 runs), and the most troublesome I got in a hundred of attempts was ~13k.

  • Custom User Avatar

    To find a solution you basically try a queen constellation, test it, then you try another queen constellation - until you found one, right?
    How many of such guesses did you need per average (just a rough estimation) until you found a solution for the 1000x1000 board?

  • Custom User Avatar

    At least it was not just me :D

  • Default User Avatar
  • Default User Avatar

    I had the same problem -- thanks for pointing it out!

  • Custom User Avatar

    Yep, works fine now, thanks.

  • Default User Avatar

    Hi awesomead, I have made a change that should fix everything. Please try again when you get a chance, thanks.

  • Default User Avatar
  • Custom User Avatar

    Thank you very much for your quick response. I had written that part and when I wanted to rewrite it, I just deleted without writing it new.
    So I thought I considered everything and it seems that then my frustration made me blind.
    Now it works!

  • Default User Avatar
    * a valid response word must contain four different letters
    
  • Custom User Avatar

    Hello, I just wanted to ask how trustworthy are the tests in JavaScript?
    More than one time I've seen tests like the one beneath.
    Alice has no valid word in her memory, however Bob does - namely heme.
    My code finds this word and therefore the winner is 1 (Bob). The test however claims that -1 is the correct result.
    Either the tests are heavily unreliable or i misunderstood the Kata completely.

    Thanks for help in advance!

    Start word: home
    Starting person: Alice
    Expected result: -1
    
    Alice: spat,hale,tail,byre,poco,beet,ekes,horn,leis,mows,adze,gaol,thro,dirt,veto,bars,fuds,limn,dyad,pily,sard,floe,coda,quad,hilt,purl,feta,wiki,near,pois,loll,wool,joke,hawk,vaws,pith,mack,vail,ohed,opah,jure,tala,flow,tups,club,koan,staw,taus,west,hail,eats,reds,roam,tuba,acne,kirk,burb,pews,hang,culm,rows,rasp,impi,jour,uvea,isle,doms,exit,pogy,scow,anga,ludo,gist,kolo,tody,cote,slue,rath,maps,pave,ware,gyri,echt,bedu,ween,baps,fore,raws,typo,rhos,bent,vatu,urea,loto,sagy,mise,anon,sari,smug,nill
    Bob: safe,pias,last,tray,tort,culm,girn,aims,nays,cuif,teds,bent,wive,eide,goos,halo,cans,blae,nite,kist,bozo,bawl,pion,sods,muns,bitt,molt,lime,jamb,mote,bins,frug,froe,yowl,huck,apes,jogs,rhus,tonk,geek,oink,efts,boar,bind,mope,eche,orcs,bend,tyre,heme,gunk,whys,desk,duro,bean,foss,bogs,inly,wham,peen,floc,meno,mell,roti,haen,samp,eyry,hoya,fine,suit,fume,dojo,waft,alky,tret,cars,lean,sack,pool,abut,same,odes,yang,undy,list,lite,heir,nosy,bole,tegs,fehs,grum,lipe,pang,tike,tick,kaes,lade,gadi,luny