microsoft / jericho

A learning environment for man-made Interactive Fiction games.
GNU General Public License v2.0
254 stars 42 forks source link

Missing ends of words? #15

Closed ronentk closed 5 years ago

ronentk commented 5 years ago

Hi, When trying to print the dictionary in Zork for example, only the first 6 letters are returned.

Any ideas why this may be happening? Thanks!

Sample code (used this zork z5 file, as there was no link on this site).

from jericho import *
env = FrotzEnv("zork1.z5", seed=12)
initial_state = env.reset()
print(env.get_dictionary())

yields

[$ve, ., ,, ", a, across, activa, advent, advert, again, air, air-p, all, altar, an, ancien, and, answer, antiqu, apply, around, art, ask, at, attach, attack, aviato, awake, away, ax, axe, back, bag, banish, bar, bare, barf, barrow, basket, bat, bathe, bauble, beauti, beetle, begone, behind, bell, below, beneat, bird, birds, bite, black, blade, blast, blessi, block, bloody, blow, blue, board, boarde, boards, boat, bodies, body, bolt, bones, book, bookle, books, bottle, box, bracel, branch, brandi, brass, break, breath, brief, broken, brown, brush, bubble, bug, buoy, burn, burned, burnin, but, button, cage, canary, candle, canvas, carpet, carry, carved, case, casket, cast, catch, chain, chalic, chant, chase, chasm, chest, chests, chimne, chomp, chuck, chute, clean, clear, cliff, cliffs, climb, clockw, close, clove, coal, coffin, coil, coins, coloni, come, comman, consum, contai, contro, count, cover, crack, crawlw, cretin, cross, crysta, cup, curse, cut, cyclop, d, dam, damage, damn, dark, dead, deflat, derang, descri, destro, diagno, diamon, dig, dinner, dirt, disemb, disenc, dispat, dive, dome, donate, door, douse, down, drink, drip, drive, driver, drop, dryer, dumbwa, dusty, e, east, eat, echo, egg, egypti, elonga, elvish, emeral, enamel, enchan, encrus, engrav, enormo, enter, evil, examin, except, exit, exorci, exquis, exting, eye, fall, fantas, fasten, fcd#, fear, feeble, feed, feel, fence, fermen, fiends, fierce, fight, figuri, filch, fill, find, fine, finepr, firepr, fix, flamin, flathe, flip, float, floor, fluore, follow, foobar, food, footpa, for, forbid, force, ford, forest, fork, free, freeze, frigid, froboz, from, front, frotz, fry, fuck, fudge, fumble, g, garlic, gas, gate, gates, gaze, get, ghosts, giant, give, glamdr, glass, glue, go, gold, golden, gothic, grab, graces, granit, grate, gratin, grease, green, ground, group, grue, guide, guideb, gunk, h2o, hand, hand-, hands, hatch, head, heap, hello, hemloc, hemp, her, here, hi, hide, him, hit, hold, hop, hot, house, huge, hungry, hurl, hurt, i, ignite, imbibe, impass, in, incant, incine, inflat, injure, inscri, insert, inside, intnum, into, invent, invisi, is, it, ivory, jade, jewel, jewele, jewels, jump, key, kick, kill, kiss, kitche, knife, knives, knock, l, label, ladder, lake, lamp, land, lanter, large, launch, leaf, leafle, leak, lean, leap, leathe, leave, leaves, ledge, letter, lid, lift, light, liquid, liquif, listen, lock, long, look, lose, lower, lowere, lubric, lunch, lungs, lurkin, machin, magic, mail, mailbo, make, man, mangle, manual, map, marble, massiv, match, matchb, matche, materi, me, melt, metal, mirror, molest, monste, mounta, mouth, move, mumble, murder, myself, n, nail, nails, narrow, nasty, ne, nest, no, north, northe, northw, nut, nw, odor, odysse, of, off, offer, oil, old, on, one, onto, open, orcris, orient, out, over, overbo, own, owners, ozmoo, page, paint, painti, pair, panel, paper, parchm, passag, paste, pat, patch, path, pdp1, peal, pedest, pepper, person, pet, pick, piece, pierce, pile, pines, pipe, place, plasti, platin, play, plug, plugh, poke, poseid, pot, pour, pray, prayer, press, print, procee, pull, pump, punctu, pursue, push, put, q, quanti, quit, raft, rail, railin, rainbo, raise, ramp, range, rap, rape, read, red, reflec, releas, remain, remove, repair, repent, reply, restar, restor, ricket, ring, river, robber, rocky, roll, rope, rub, rug, run, rusty, s, sack, sailor, sand, sandwi, sapphi, save, say, scarab, scepte, sceptr, score, scream, screw, screwd, script, se, search, seawor, secure, see, seedy, seek, self, send, set, shady, shake, sharp, sheer, shit, shout, shovel, shut, sigh, silent, silver, sinist, sit, skelet, skim, skip, skull, slag, slay, slice, slide, small, smash, smell, smelly, sniff, solid, song, songbi, south, southe, southw, spill, spin, spirit, spray, squeez, stab, stairc, stairs, stairw, stand, stare, startl, stay, steep, step, steps, stilet, stone, storm, strang, stream, strike, stuff, super, superb, surpri, surrou, suspic, sw, swallo, swim, swing, switch, sword, table, take, talk, tan, taste, taunt, teeth, tell, temple, the, them, then, thief, thiefs, throug, throw, thru, thrust, tie, timber, to, tomb, tool, toolch, tools, tooth, torch, toss, touch, tour, trail, trap, trap-, trapdo, treasu, tree, trees, triden, troll, trophy, trunk, tube, tug, turn, twisti, u, ulysse, unatta, under, undern, unfast, unhook, unlock, unrust, unscri, untie, up, useles, using, valve, vampir, verbos, versio, viciou, viscou, vitreo, w, wade, wait, wake, walk, wall, walls, water, wave, wear, west, what, whats, where, white, win, wind, windin, window, winnag, wish, with, wooden, wrench, writin, xyzzy, y, yank, yell, yellow, yes, z, zork, zorkmi, zzmgck]
MarcCote commented 5 years ago

It might have something to do with the fact that the Z-Machine only looks for the first N characters. From the top of my head, I don't remember the exact N, maybe it is 6!

mhauskn commented 5 years ago

That's correct, zork only considers first 6 characters of any word.

On Tue, Dec 11, 2018, 7:50 AM Marc-Alexandre Côté notifications@github.com wrote:

It might have something to do with the fact that the Z-Machine only looks for the first N characters. From the top of my head, I don't remember the exact N, maybe it is 6!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Microsoft/jericho/issues/15#issuecomment-446251630, or mute the thread https://github.com/notifications/unsubscribe-auth/AABNOa_SmA75n0S2Gc5q_A3n39Z9lg9Jks5u39REgaJpZM4ZNrjY .

davidjhall commented 5 years ago

From the z-spec section 13.3 / 13.4: Z file versions 1-3 support 6 character words, 4 and above support 9 character.