Ad
  • 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
    
  • Custom User Avatar

    Hi, me again! Still C#, still an issue:

    Consider the following output:

    Game starts!
    Alice: keto, pima, amin, acyl, pons, fons, prof, mash, cats, show, rolf, jowl, safe, urns, quip, kiva, kafs, make, ruin, burl, crow, gaur, ayes, vang, helo, kune, troy, taus, trey, bawn, bulk, life, soli, bach, exit, anil, jauk, pech, glad, lars, utas, visa, ropy, trug, apes, roms, mocs, mops, dopy, vias, ylem, sate, nape, hums, grok, jolt, lyse, flir, semi, zein, tour, kino, user, glue, coni, fest, temp, dato, axel, toke, rums, fuel, jibs, fids, desk, sack, calf, tags, type, lech, care, rave, ahed, dyes, hail, gain, bort, soja, folk, rent, juke, echo, yams, brin, racy, more, nags, carn, junk, haft, veal, yods, band, deys, molt, pugh, bray, dona, herm, skag, wauk, rout, bask, devs, pint, fury, foul, noma, hors, curn, sail, mien, tavs, cork, hyle, deck, muns, hoke, phot, gads, sock, shiv, fiat, amid, yins, alps, kelt, buns, gamp, curt, plew, quin, lose, tans, sola, kier, pled, koas, dahl, plie, doum, ptui, pita, swiz, bars, tamp, doer, hubs, limp
    Bob: blaw, pant, rotl, rukh, hade, math, fits, peon, kept, jour, quay, sort, pons, scop, turf, pean, clip, stew, ramp, nibs, dogy, lisp, lady, mean, lard, naif, hose, cant, glom, mild, agin, font, nabs, zein, dole, soap, glut, envy, self, lech, rams, pint, dont, lads, toea, arty, kame, stem, mity, balk, tody, futz, winy, yelk, vice, duel, kors, mite, visa, ugly, prim, malt, gray, kine, bump, lobs, awed, tarn, hunt, snag, vine, slub, pets, mien, oxen, pirn, bota, spun, fest, yuga, wynd, whig, bigs, oral, jure, acne, loup, gies, aits, ahis, tabs, bise, vaus, tong, flaw, lime, cris, mans, take, reck, tain, lurk, type, gulf, sift, twae, pony, runs, many, rato, tome, berk, kips, coxa, zeal, bawn, mist, jade, suba, holk, kudo, hoed, dint, foin, tram, kith, cane, drug, pina, waif, case, foes, murk, goat, mown, puke, sire, toga, lash, hies, bake, lino, gams, mike, miry, shot, tire, okay, hats, luna, pias, them, peat, mony, hols, eyas, tens, thae
    
    Initial Word: tavs
    Alice found a match for tavs: taus
    Bob found a match for taus: tabs
    Alice found a match for tabs: tags
    Bob failed to find something to match tags
    Game ends, Alice won
    
    Test Failed
      Expected: 1
      But was:  0
    

    The inputs are getting slightly unwieldy at this point, but I still tried to go over them by hand and verify; there is no answer for Bob to give, but the tests expect him to win. Are there edge-cases I'm missing or a rule I have overlooked?
    Note, as prior, I am passing the fixed tests. I also took my C# code, translated it word for word into Python and that solution passed wihthout issues.

  • Default User Avatar

    Thanks for the feedback, I am checking everything and will fix this as soon as possible.

  • Custom User Avatar

    Oi. Indeed. Reading comprehension is useful sometimes....

  • Custom User Avatar

    As I understood "cuss" is not valid answer as far as it has two letters 's' and we have rule
    a valid response word must contain four different letters

    So probably it should stop execution somewhere on previous steps fo the game

  • Custom User Avatar

    C#

    There's something iffy going on with the random tests.
    First of all, they pretty much all expect to end after the first or second word, i.e. both lose or one instantly fails. Games very rarely go on for more rounds than that.
    Secondly, I keep failing tests where the expected result is -1 (both fail), but my solution has one of them actually finding an answer.

    Here's a sample of my test logs:

    // 0 = Alice, 1 = Bob
    
    0 failed to find something to match czar
    1 found a match for czar: izar
    Game ends, 0 failed last
    0 failed to find something to match heal
    1 found a match for heal: teal
    Game ends, 0 failed last
    0 failed to find something to match wyle
    1 failed to find something to match wyle
    Game ends, 1 failed last
    0 failed to find something to match each
    1 failed to find something to match each
    Game ends, 1 failed last
    0 failed to find something to match qoph
    1 failed to find something to match qoph
    Game ends, 1 failed last
    0 failed to find something to match karn
    1 failed to find something to match karn
    Game ends, 1 failed last
    0 found a match for dals: dams
    1 found a match for dams: dais
    0 failed to find something to match dais
    Game ends, 0 failed last
    0 failed to find something to match welt
    1 failed to find something to match welt
    Game ends, 1 failed last
    0 failed to find something to match spue
    1 failed to find something to match spue
    Game ends, 1 failed last
    0 failed to find something to match haul
    1 failed to find something to match haul
    Game ends, 1 failed last
    0 found a match for bird: burd
    1 found a match for burd: surd
    0 failed to find something to match surd    // wow, a 3rd round! :)
    Game ends, 0 failed last
    0 failed to find something to match cuds
    1 found a match for cuds: cuss     // look, Bob found an answer!
    Game ends, 0 failed last
    
    Test Failed
      Expected: -1    // but Bob found "cuss"
      But was:  1
    

    All test runs look pretty much identical (pass all fixed tests, btw). My solution does not take any shortcuts, if a word exists and has not been used, it will be found as an answer.

    What gives?

  • Default User Avatar

    @DayDreamer_7 I have found a test from the C# random test generator upon which your code fails. I checked this test against the reference solution in multiple languages and also against code from highly qualified members. Having reversed the expected/submitted to the proper order and provided a test for your debugging, I will close the issue. If you find any further concern, please re-post and provide evidence. I would like to see you be the first to solve this kata in C#. Thanks, and good luck.

        public static string[] alice = new string[200] {"vair", "skeg", "mogs", "emes", "cusk", "oldy", "dude", "furl", "tets", "mabe", "wars", "heil", "memo", "task", "punt", "knur", "rise", "sain", "sang", "clue", "shog", "maar", "joky", "rase", "fond", "colt", "tock", "cows", "dumb", "cake", "twae", "ahis", "burr", "taws", "pork", "blue", "tipi", "duel", "gear", "hair", "torc", "case", "nipa", "pupa", "live", "toea", "hers", "zing", "pyin", "arcs", "emmy", "tyin", "yaff", "bias", "host", "leak", "supe", "dice", "grew", "klik", "eddy", "snub", "hone", "hays", "dove", "tans", "salp", "mead", "chef", "leat", "buds", "jibb", "cede", "naff", "robs", "musk", "isle", "etna", "jibs", "quai", "stop", "slit", "yodh", "goad", "base", "gaen", "yips", "lido", "clod", "kens", "agon", "once", "vast", "wail", "mesh", "jail", "foci", "loaf", "jury", "brew", "dock", "bans", "bels", "jauk", "sris", "weep", "leva", "fate", "said", "wish", "taxa", "muss", "ions", "pent", "toga", "mazy", "wawl", "ones", "urea", "meek", "rude", "jamb", "naos", "mane", "hues", "weel", "vamp", "sane", "luau", "tabu", "slub", "bail", "each", "uvea", "wild", "taco", "camp", "tuff", "coss", "both", "revs", "soys", "warp", "abas", "bash", "hold", "harp", "tegg", "sild", "gapy", "barn", "guid", "ruin", "bask", "cars", "elhi", "saga", "milo", "dont", "kobs", "clip", "pots", "wyte", "tang", "claw", "jarl", "weer", "nips", "awes", "rais", "juco", "rots", "word", "prez", "ammo", "efts", "cods", "cols", "kerf", "debt", "yank", "bona", "woes", "neap", "flan", "lion", "etic", "raga", "beth", "coof", "herm", "herb", "rolf", "reed", "dore", "kora", "veep", "bolo", "teth", "vena"};
        public static string[] bob   = new string[200] {"gasp", "meou", "naan", "hoys", "sari", "modi", "buss", "leek", "thio", "rood", "rims", "ludo", "olid", "brat", "both", "vial", "byte", "jade", "gang", "wynd", "ashy", "bale", "some", "dish", "toro", "lune", "raze", "dipt", "noel", "coax", "bays", "redo", "eras", "rick", "luau", "nard", "lass", "brim", "coss", "weir", "neap", "moll", "dibs", "tame", "kine", "kick", "moue", "gimp", "lies", "rias", "sear", "tans", "kief", "pant", "dram", "vang", "mead", "sard", "apod", "book", "muts", "jape", "fast", "talk", "colt", "viny", "dols", "ions", "grow", "lehr", "seif", "goer", "daft", "crus", "cauf", "vaws", "quid", "duly", "peel", "mica", "dura", "warp", "cred", "sire", "glam", "nigh", "lime", "watt", "meta", "hora", "heth", "cool", "tern", "sego", "kaif", "puli", "bunt", "waxy", "alfa", "lave", "vile", "eave", "riel", "just", "cots", "titi", "perk", "yoke", "pend", "thae", "beam", "cadi", "cyme", "hyps", "jane", "sulk", "holm", "dodo", "dojo", "dele", "deck", "mops", "sods", "roil", "simp", "yaup", "lars", "pima", "sock", "quiz", "bene", "duit", "hang", "keas", "taos", "luna", "oner", "dags", "fuds", "lags", "fins", "maut", "copy", "peat", "suds", "sand", "muds", "yens", "bags", "foin", "rats", "else", "kept", "seed", "scab", "rams", "aril", "sine", "baas", "lips", "delf", "mink", "cope", "fila", "dote", "rote", "roam", "kifs", "reek", "sail", "cist", "bola", "sigh", "join", "bice", "lung", "cuif", "ouds", "ance", "cuds", "ditz", "bend", "fubs", "boos", "kors", "fido", "trap", "bone", "girl", "shut", "culm", "cute", "funs", "rhea", "seme", "huic", "kues", "afro", "cast", "type"};
        string word = "bros";
        int first = 0;
    
        [Test]public void Test_2(){Assert.AreEqual(-1,Kata.Solution.Mutations(alice,bob,word,first));}
    
  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    @heptapod here is such a random test (each memory length is 100) for which your code returns 0 where instead it should return -1:

    alice = ["fans", "sick", "eave", "moos", "gown", "knit", "when", "sins", "miff", "jour", "balk", "duro", "swum", "aria", "eyas", "born", "waxy", "jolt", "aloe", "haik", "sidh", "peds", "pias", "guys", "leno", "fern", "vugg", "neap", "vena", "hays", "buds", "fiar", "melt", "scry", "toes", "okas", "firn", "bags", "awny", "poly", "your", "keta", "weld", "kiva", "urds", "palp", "hint", "dang", "anil", "ryot", "goth", "torn", "ansa", "crus", "rose", "toke", "rear", "haws", "peri", "bill", "kaon", "hobo", "gawp", "keep", "wart", "deil", "elks", "trug", "whig", "shin", "pepo", "awee", "syce", "dags", "mole", "ludo", "shaw", "supe", "baht", "euro", "jell", "abye", "fuds", "twit", "lino", "kohl", "awry", "kadi", "safe", "tams", "kune", "odah", "haes", "glim", "vein", "ouds", "sers", "oohs", "zeds", "idol"]
    bob   = ["purs", "doms", "glug", "sabe", "davy", "deni", "curr", "byte", "raki", "mure", "hold", "burg", "fisk", "bias", "lipa", "trap", "demo", "room", "ghee", "hogs", "wham", "myna", "acta", "snit", "vara", "larn", "ditz", "unco", "cast", "hags", "tavs", "ache", "dunt", "bona", "peak", "heel", "guvs", "dune", "puli", "gyre", "wynn", "ruck", "inby", "sake", "bent", "akee", "ance", "kaka", "mews", "fame", "jury", "tora", "week", "epee", "wych", "riot", "bize", "crew", "jiao", "karn", "fogs", "lieu", "beds", "meow", "caph", "reck", "mixt", "hyla", "sine", "tump", "keir", "tear", "birr", "fawn", "juco", "jowl", "jell", "nave", "oaky", "tzar", "nebs", "talk", "lent", "dies", "hilt", "dint", "guls", "sext", "jigs", "woof", "nene", "tike", "leys", "mark", "wire", "nite", "anas", "atma", "coma", "risk"]
    word = "supe"
    first = 1
    
  • Default User Avatar

    @YuKir hi, again: please get back to me with some data, thanks

  • Loading more items...