Showing posts with label game. Show all posts
Showing posts with label game. Show all posts

Friday, August 07, 2026

[jxrlppkn] most defenses

consider a mate in N chess problem.  how many paths through the game tree end in checkmate in exactly N moves?  (also consider less than N moves.)

for a good chess problem with no duals, every attacker move in that subset of the game tree has exactly one move that accomplishes mate in N.  if not, specify a strategy (e.g., fewest defender branches) that deterministically picks one attacker move and prune the rest of the attacker branches.  only alternatives by the defender contribute to the total branches.

compose chess problems that maximize the number of paths.  or the number of nodes in the pruned game graph (branches may merge through transposition).

such problems tend to be annoying for humans to solve, needing to check many cases.

[dlaexadi] abstract swordfighting

incomplete information version:

at the beginning of a turn, you see your opponent's attack.  you choose a defense, which is revealed to the opponent.  attack and defense jointly define the probability that the opponent's attack is successful, and the distribution is sampled.  if the attack succeeds, you lose the game.  if the attack fails, it is your turn to choose an attack.  the defense you chose earlier constrains your possibilities of attack.  the attack you choose will constrain your possibilities of defense next turn if the game continues.

imperfect information version:

at the beginning of a turn, the opponent chooses attack part 1 and attack part 2.  you see part 1 of your opponent's attack.  you choose a defense, then part 2 of the opponent's attack is revealed.  your defense is revealed to the opponent.  your defense and opponent's attack part 2 deterministically define whether the opponent's attack succeeds.  if the attack succeeds, you lose the game.  if the attack fails, you choose your attacks part 1 and part 2, and the opponent chooses a defense after seeing your part 1.  your defense earlier constrains your attack part 1, attack part 1 constrains attack part 2, and attack part 2 constrains defense next move if the game continues.

perfect and complete information version:

there is only one possible part 2 attack following any given part 1 attack (so there is no reason to conceal part 2).  the way to win the game is to maneuver the opponent into a position such that there is no defense against an attack.

simplified imperfect information version:

there is only one possible part 1 attack, so it provides no information.  the information available to the defender is the attacker's defense last move.

fancier imperfect information version:

both attack and defense have a "to be revealed" portion and a portion not revealed that also constrains actions next move.  "to be revealed" contains enough information to score the current move, to determine if there is a winner.  we need a mechanism to force a player to obey self-imposed constraints hidden from the other player.  complicated sequences over many moves can be encoded as strategies as done in game theory.  such sequences could involve changing internal state, not affecting the outcome of the current move.

there are a whole bunch of tables that need to be defined: what attacks can follow what defenses and vice versa, and the probabilistic or deterministic outcomes of attack versus defense.  defining these tables offers infinite possibilities of game design.  for example, an action taken one move can constrain actions many moves down the line.

I think all two-player non-cooperative games can be expressed in this framework.

Friday, July 17, 2026

[fixtyxpa] walk may repeat the batter

if a baseball batter is awarded a base on balls, let the manager have the option of instead having the next batter ("batter on deck") take first base and the walked batter repeat the at bat.

not sure if it should be a temporary or permanent change in the batting order.

or, any pinch runner instead of batter on deck.

Sunday, April 19, 2026

[obaxedbg] which half point

rate chess players by how often they turn a drawn position into a lost one, and by how often they turn a winning position into a drawn one.  (turning a winning position into a lost one counts as one of each.)  the best at avoiding bad moves of the first type might not be the best at avoiding the other type.

devilish detail of determining ground truth of a position.  maybe play out by an engine.

devilish detail of normalization: some positions are easier to make mistakes in, and some players probably (as a result of play style) encounter such positions more frequently.

skill difference might matter: a subtle (but still half-point) mistake against a beginner might not matter, because the beginner might not be able to exploit it, or might be expected to blunder it back later in the game.

having a high rate at either or both of these categories might not equate to bad results -- perhaps you have a playing style that, even though you make a lot of mistakes, you induce your opponents to make even more.

having a low rate of making mistakes might not equate to good results: only one mistake per game is enough to lose every game.

opposite measure: how often a player induces an opponent to make each of the half-point mistakes.  similar devilish details, including normalization.

Saturday, November 01, 2025

[lrppbqqi] word primes

below are the 129 primes less than 27^2 = 729, written in big-endian base 27, using the following straightforward encoding of base-27 digits:

a=1 b=2 c=3 d=4 e=5 f=6 g=7 h=8 i=9 j=10 k=11 l=12 m=13 n=14 o=15 p=16 q=17 r=18 s=19 t=20 u=21 v=22 w=23 x=24 y=25 z=26

b c e g k m q s w ab ad aj an ap at az be bg bm bq bs by cb ch cp ct cv cz da de ds dw eb ed en ep ev fa fe fk fq fs gb gd gh gj gv hg hk hm hq hw hy ih in it iz ja jg jk jm jw kj kn kp kt lg lm lw ly mb mh mp mv na ne nk ns nw od on op oz pa pg pk pq py qb qd qh qt ra re rm rq rw sh sj ta tg tq tw ub ud uj ut uz ve vg vm vs vw vy wj wt wv wz xe xk xm xy yb yh yp yz zg zq zy

there are 9 1-digit primes and 120 2-digit primes.

the digits c f i l o r u x corresponding to multiples of 3 never occur as the last (units) digit, except for c by itself.

for 1- and 2-digit primes, we do not need a symbol to represent zero.  the first digit cannot be zero because that would be a useless leading zero.  if the second digit were zero, the number would be a multiple of 27, so not prime.

future work: consider a prime base so that all letters can occur in the units place.  deal with the special case "10" by ignoring it.  what two characters should we add to reach the 28 letters needed for base 29, and where in the alphabet should we add them?  or which 4 should we eliminate for base 23?  (probably wxyz.)

for the 2098 3-digit primes between 27^2 = 729 and 27^3 = 19683 below, we do need a symbol for zero as a middle character.  we choose dash (hyphen), mimicking English orthography.  (apostrophe was another good option.)

for 4-digit primes and larger (not explored), we could have multiple dashes in a row which are hard to distinguish in fonts that meld them into a single line, so some other symbol (e.g., apostrophe) for zero would be better.  or, do base 26 instead of base 27: there will be no words starting with a=0.  (or, make z the zeroth letter.  x is another good choice for zero, unlikely to begin a word.)

these primes could be the dictionary for a weird game of Scrabble.  blank is zero.  reorder the alphabet so that the frequency of Scrabble letter tiles correspond to the frequency of letters among 2-digit primes.

which English words are primes?  this should be easy.  assuming we stick with base 27, choose a different mapping of letters to digits so that multiples of 3 correspond to the letters least likely to end a word.  or begin a word if encoding little-endian.  find the mapping of letters to digits that maximizes the number of prime English words.

a-d a-j a-n a-v aaa aae aam aaq abd abn abz aca ack acm acq acs adb adp adt adv adz aem aeq aes aew afp aft aga agk ags agw ahb ahh ahv ahz aie aik ais aiy ajj ajn ajt ajv ake akg akm akw aky alh alj alp amg amk amm amq amw anb anj anp anv aoq aos apb apj apt apz aqe aqm aqy arb arh arn arp arv asg asq ath atj atn att atv aua aue aug auk auw auy avd awk awq aww axd axv aye ays ayw ayy azb azh azp azt azv b-a b-m b-w b-y bab bad bah ban baz bbk bbs bcd bcj bcn bct bda bde bdm bdq bed beh ben bep bet bez bfa bfg bfq bgj bgp bgt bgv bhs bhw bhy bih bit biv bje bjm bjs bjy bkd bkv bla ble blg bls bmb bmn bmv bnk bny bod boh boj bon bop boz bpk bpq bpw bqn bqp bre brg bsb bsh bsp bsv bsz bta bte btm bts bub bud bun bva bvk bvq bwb bwd bwh bwj bwt bxe bxg bxw bxy byd byh byj byt bza bzs c-p c-t c-z cag caw cay cbb cbj cbz cca cce ccm ccs ccy cdb cdn cdp cek ceq ces cey cfb cfh cfv cga cge cgg cgm cgq cgw chh chn cht cig cik ciq cjb cjj cjp cjt cks clj clt cma cme cmk cmm cms cnn cnz coa coq coy cpb cpn cqa cqk cqm cqq cqy crd crj crn crp crt crz csg csk csm css ctb ctd ctn ctv ctz cum cuw cvh cvj cvp cvt cvv cwk cwy cxb cxh cxp cxv cxz cyq cyy czh czn czt d-a d-k d-w daj dan dat daz dba dcb dcd dcn dcv dcz ddm ddq ddy dej dep dfa dfe dfk dgd dgn dgp dhe did dih dij div dja dje djq djw dkd dkh dkp dlk dlm dlq dls dmd dne dng dnm dns dny dob doh doj dov doz dpk dpm dpw dpy dqn dqp dre drk dsd dst dta dte dtg dtk dtm duh dup dva dvg dvq dvs dvw dwb dwd dwj dwt dwv dxg dxq dxs dyb dyp dyv dyz dze dzm dzs dzy e-n e-z eaa eae eas eay ebb ebj ebt eca ecg ecm edh edn edp edz eem eeq eew efn efp efz egm egq egs ehb ehp eht eia eis eiw ejb ejd ejh ejn ejp eka eke eky elt eme emg emk emq emw emy end enz eoa eog eow epb epn epp epv eqg eqw eqy erb erh erv erz esa ess etp etz eue eug euq eus evb evd evn evt evv ewe ewg ewq eww exd eyg eyq eys ezb ezj ezp ezz f-q f-w fah fat fav fbm fbs fbw fcb fch fcz fda fdk fdy fed feh fej fen ffk ffm ffy fgd fgt fha fhg fhm fid fit fiv fiz fje fjg fjm fjs fkb fkh fkt fle flw fly fmd fmh fmz fng fod foh foj fon fot fov fpg fpk fpy fra frk frq fsb fsp fsv fte ftq fts ftw fub fuj fup fuz fva fve fvs fvy fwd fwh fwn fwp fwz fxa fxq fyb fyj fza fze fzk fzw fzy g-d g-j g-p gaq gaw gbj gbn gbv gce gcm gcy gdp gdt gdv gdz gew gfh gfn gfp gge ggk ggq ghd ghn gia gie gjh gjn gjt gjz gkg gkm gkq gks gld glj gln glp glv gmq gmw gmy gnb gnt gnv gnz gok gom gos gow gpv gqa gqg gqk gqs grb gsg gsw gsy gtd gth gtj gtn gtp gtz gum gus guw gvd gvn gvt gwm gwq gws gwy gya gye gym gyw gzb gzh gzp gzv h-g h-k h-q h-s h-y hab hah haj hat hav hbk hbq hcj hcn hcz hdm hen het hfm hfq hgh hgp hgv hgz hhe hhs hhy hid hin hip hiz hjk hjs hkb hkd hkn hkv hlg hlq hmn hmp hmt hna hng hnk hns hoj hot hoz hpe hpg hpm hpw hqh hqj hqt hqz hre hrk hrs hry hsh hsn hsp hsv hta htg htq hty huv hva hvw hvy hwp hwt hxa hxk hyn hyv hzm hzq hzs i-b i-h i-j i-p i-t iak ias ibd ibv ick icq ics idd idj idt idv iee ieg iem iew ifj ifn igk igm ihb ihd ihn ihp ihz iis iiw iiy ijb ijj ijz ike ikk ikm iky iln ilv ilz ime inh inj int inv ioa ioe iok ioq ioy ipd iph ipt ipz iqg iqs iqw irj irv ise itb ith itt itz iua iuw ivd ivv iwe iwk iwy ixb ixd ixj ixt iya iyg iyk iyq izt j-g j-q j-s jad jan jap jbe jbg jby jcv jdm jds jeh jez jfe jfg jfy jgb jgh jgj jgt jha jhk jhq jhw jid jih jin jip jiz jja jjm jjq jjw jkb jkd jkp jkt jlg jly jmb jmh jna jne jnm jns jnw jod joh jov jpa jpe jps jqd jqh jqj jrm jrq jsn jst jsz jtk jtw juj jup jut juv juz jvq jvw jwh jwp jwv jwz jxk jxm jxy jza jzq jzs jzy k-t kag kam kaw kbh kbn kbp kbt kca kck kcq kcw kdt keg kem keq key kfj kga kgk kgm kgw kgy khb khh kia kig kik kiy kjb kjd kjh kjv kka kkm klj klt klz kmg kmq kms knv knz koe kog kos kow kpj kpp kqw krh krp krv kse ksg ksk ktd ktn ktv kuk kum kuw kvj kvn kvp kwa kwg kww kxb kxj kxn kxv kxz kye kym kys kyy kzj kzp kzt kzz l-e l-m lad lah lba lbe lbq lbs lcb lch lcj lct lde ldg ldk led lej lfm lfs lfw lgd lgn lgz lhe lhg lih lij lip lit liv ljk ljw ljy lkd lkn lkv lls lmd lmj lna lng lnk lny lod loh lot lpa lpg lps lpw lqb lqn lqt lre lrg lrw lsp lst lsv lte ltw lud luh luv luz lva lvg lwb lwh lwv lxa lxg lxq lxw lxy lyh lyj lyn lyp lzk lzm lzq lzw m-b m-n m-t mag maq mbb mbh mbp mbt mdb mdp mea meg mek meq mes mfd mfj mfv mgk mgm mgw mhd mhz mia mim mis miw mjb mjt mjv mkg mkm mkq mlb mlj mlp mma mme mmk mmw mnb mnd mnp moa moe mos moy mpn mpt mpv mqe mqm mrd mrj msq mss mtt mtv muq muw muy mvh mvt mvv mwa mwe mwm mxh mxn mxp mxz myg myk myq myy mzb mzn n-e n-q naj nan nat naz nbg nbk nbm ncb ncn ncp ncz ndg ndq nds ndw neb nep nfa nfw ngd nhe nhg nhk nid nih nij nin nja njk njw njy nkj nkz nla nmb nmj nne nnm nnq nnw nob nop not npa npm nps npy nqb nqv nqz nrq nrs nsd nsj nsn nst ntg nty nuh nup nuz nwd nwj nwt nwz nxe nxg nxm nyb nyh nyj nyv nza o-b o-d o-n o-v oak oaq oay obd obn ock odd odn odp odz oea oem oeq oew ofp oft ofv ogg ogy ohh ohj oht ohv ohz ois ojh okg okk oks oky olb oln olt oma omm omy ond onh onp ook oom opb opp opz oqe oqq orb orp orv orz oss osw oth otn otp otv oua ouq ouy ovt ovv oww oxd oxj oxn oyg oyk oyw ozt p-m p-q p-y pah paj paz pba pbm pby pde pdg pdk pdq peb peh pen pev pfa pfe pfg pfm pgj pgn phg phq phw pib pip pit piz pje pjg pjs pjy pkh pkj pkt pkz pls plw pmv pmz pna png pob pod ppa ppe ppk ppm ppq ppw pqt pqz prg prk prm pst psz ptg ptw puh puj put puv pve pvk pvs pvw pwd pwp pxk pxq pyd pyh pzg pzk pzm pzy q-h q-p q-t qaa qam qaq qbd qbj qbz qce qcm qcq qcw qdb qdj qdp qdz qek qem qes qey qfn qfv qga qgg qgs qhb qhd qhj qia qie qik qiq qiw qjh qjz qkg qkm qkw qld qlv qlz qmm qms qnj qnt qoa qok qow qoy qpd qpp qqa qrj qrn qrt qsa qse qsk qsm qsq qth qtt qtz qug qum qus quw qvn qvp qvt qvv qws qww qxb qxh qxv qyy qzd qzh qzn qzz r-e r-y rab raj ran rav rba rbg rbk rcn rcp rcz rdk rds reb rej rfg rfm rfy rgb rgp rgt rgz rha rib rip rje rjg rjs rjy rkb rkv rle rlk rlq rlw rmd rmn rmz rnm rnw roj roz rpm rpw rqj rqp rre rrk rrs rry rsn rtg rtq rts rty rub rud ruh rut ruv rve rvg rvm rwh rwn rwp rwt rxk rxs ryb ryj rze rzg rzq s-h s-v s-z saa sae saw say sbb sbh sbp sbz sca sdd sdh sek sem sew sey sfp sft sgk sgq shd shn shp sht sim sjv ska ske skk sky slb slv sme sms snn snt snv soy spj spt sqk sqm sqq srd srj sse ssw ssy stj stp stt sua sue sum sus svb svd svp swg swq sxd sxt syg syk syq syw syy szd szh szj t-k t-m tan tat tav taz tbe tbs tbw tch tcv tdk tdy teb teh tep tev tez tfe tfk tfq tfy tgb tgj tgn tha thq thy tid tih tit tja tjq tjs tkb tkj tkn tkt tls tly tmh tmp tmt tmz tnk tny tpa tpe tps tqn tqv trg trk trq try tsh tsn tta ttk ttq tts tub tun tuz tvm tvs tvy twp twz txe txm tyd tyh tyn typ tyv tze tzg tzq tzy u-d u-j u-t u-v uam uaw uay ubj ubn ubt uca uck ucw udj udv udz ueg ueq uew ufb ufv ufz ugm uhb uhp uhz uig uiq ujb ujd ujv uka ukm ukw ulh ulj uln ulp uma umg umk ums umw uom uoq uos uow uoy uph upt upz uqe uqs uqw urb urh urn urv usa utj uua uue uuk uum uuy uvd uvj uvp uvt uwg uxb uxn uxp uyg uyq uyw uzv v-s v-w v-y vab vad vah vav vaz vbe vbk vbs vch vct vcv vej ven vep vet vfq vfw vgb vgd vgv vgz vhm vhs vit vjk vjy vkd vkn vkz vla vlg vls vmv vna vne vnk vnq vod voh voj vpg vpk vpq vpw vqv vre vrw vsb vsj vsp vsv vty vub vun vuz vva vvq vvs vvy vwb vwn vxe vxg vxm vxq vyp vza vzg vzs vzw w-t waq wbb wbh wbj wbv wcw wdd wdh wdn wdz wea wes wey wfb wfh wfn wgg wgw wgy whd whj wia wik wiq wis wiw wjd wjj wjp wkm wlb wlh wlp wlz wme wms wnn wnv wok woq wos wpd wph wpj wqe wqm wrd wsk wsm wss wtj wtn wtt wtz wug wuq wuy wvp wvv wvz wwa wwe wwm wxb wxd wxp wya wyg wyy wzb wzh wzn wzt wzv x-a x-m x-w xap xba xbs xbw xcb xcd xct xcv xde xds xdw xez xfa xfk xfw xfy xgv xha xhq xhy xih xij xiv xjq xjw xjy xkn xlg xlq xls xmd xmp xng xnq xob xoh xoj xot xov xpa xpk xqb xqd xqp xqv xqz xre xrg xsd xte xtg xtk xtm xtw xty xun xuz xvg xwb xwd xwj xwn xwp xwz xxe xxy xyj xyt xza xzm xzs xzy y-d y-h y-z yaa yae yaq ybh ybj ybv yca yce ycg ycw ydh ydt yeg yek yes yfj yfn yfz ygm ygs ygy yhb yhj yhp yht yim yiy yjh yjv yjz yka ykq yks yld ymg ymk ymq ynn yog ypd ypn ypv yqg yqq yrb yrh yrt yse ysk yss yth ytv yua yue yuk yvt ywm yww yxz yyk yym yyq yys yzt z-e z-s z-y zat zba zbe zbw zcb zcp zdg zdk zdq zds zdy zfe zfw zfy zgn zgt zhk zhm zij zin zip ziv zjg zjm zjy zkh zkp zkv zlk zlw zmd zmn zna zon zot zov zpa zpe zpq zqd zqh zqj zqn zqp zqt zra zrg zrq zrw zsb zsd zsj zsp zsv ztg ztm zuj zut zuv zve zvk zvw zwb zwh zwv zxa zxg zze zzy

[riqxgwhu] ordering a deck of cards in ways that makes sense

suit major, rank major (2 possibilities)

ordering of suits (4! = 24)

king high, ace high (2)

low instead of high (i.e., reverse the ranks) (2)

total number of ways = 2 * 24 * 2 * 2 = 192

a deck of cards ordered in any of these ways will not arouse suspicion as encoding information.  or, given a deck of cards suspected of encoding information in their ordering, these are possibilities of the "start" ordering.

cf 52! ~= 192^29.7 .

next, consider adding two distinct jokers, not breaking up the main body of cards.  multiply by 3! = 6 yielding 1152.  10 bits or 3 digits.

Saturday, August 02, 2025

[lugfcqhu] gendered chess piece types

define the ranged pieces queen, rook, and bishop to be female.

define the non-ranged pieces king, knight, and pawn to be male.

but I can't think of any good reason to do this, though it is elegant that the piece types divide half and half.  mnemonic: the sexist trope in fiction that only men are tough enough to do melee combat; women like Katniss and Aerith (but not Tifa) specialize in ranged attacks from afar.

orthodox chess does not have artillery which can kill from afar without moving.  fairy chess could add such truly female pieces.

pawn promotion might be a sex change.

[elgwjvis] AI to draw an endgame

apply neural network machine learning on positions of a theoretically drawn but hard to defend chess endgame such as KRBKR.  can an AI playing the weaker side learn a policy to maintain a draw?  inspired by an AI learning to drive, not falling off the road, in the game Trackmania.

with overfitting, this is of course possible, so seek a small, or the smallest, neural network.

the AI can be tested against a tablebase.

during training, should the AI be immediately punished once it "falls" from a tablebase drawn position, or should it be punished only when checkmated?  the latter might be helpful for the AI to learn the underlying structure of the game.

previously, a human doing the learning.

Saturday, May 17, 2025

[hkgjtwvq] cube deck

create a deck of cards representing the 48 elements of the symmetry group of a cube (isometries of a cube) (automorphism group of a cube).  48 is a good number of cards for a deck, not too difficult to shuffle.

there are two suits, corresponding (roughly) to mirror images.

pairs of cards can be added to yield another: the group action.  how can addition be facilitated to make it easier for humans?  perhaps print the appropriate line of the addition table on the face of each card.  how can be group elements be compactly identified?

describe a group element by a decomposition into rotations of 90 degrees along axes (and zero or one reflection), like Rubik's cube algorithms.  but this is not compact.

an illustration of axis and angle is compact.

augment the deck with d6 dice: two of different colors, mirror images of each other.  how easy is to acquire a d6 die that is the mirror image of the conventional d6 die?

find the card corresponding to a given rotation of a die relative to a canonical unrotated state.  maybe this is the mechanic of games.

or, consider a 60-card deck of just the orientation-preserving symmetries of the regular dodecahedron or icosahedron; 60 is small enough to comfortably shuffle.  previously.  you would only need one d12 (or d20) die.  maybe two, if you want to keep track of before and after a rotation.

do d12 and d20 dice have standardized numbering?

how can one describe a rotation of (say) a dodecahedron?  starting from a canonical orientation, move the face labeled X to the top in a canonical orientation, then orient the X top face to one of 5 possible orientations.  equivalently, top face and "front" face adjacent to top.

Monday, March 03, 2025

[ncasfqep] mobility of escaping check

in the following chess position (FEN), white has 44 possible moves that get out of check:

r6K/QPPPPPPB/NNNNNNNN/8/8/8/8/7k w - - 0 1

is this the most possible?  it is not a position reachable from the orthodox initial position.

Saturday, February 08, 2025

[dsgmjgue] best pitcher vs best batter

at the end of a season, determine the pitchers and batters who are good by some statistic (in opposing ways) and compile a highlight reel of at bats when they faced each other that season.

strikeouts vs best at avoiding striking out.  low ERA vs high RBI.  few home runs vs many home runs (devil in the details in defining few and many).  catching steals vs stolen bases.

Tuesday, January 28, 2025

[dhjhjybn] semitransparent pawns

chess variant: ranged pieces can travel through pawns of their own color.

1.Rxa7, etc. become valid opening moves, perhaps problematic.

motivation was to support chess variants with more pawns (the soul of chess), possibly on larger boards.  but more pawns, say two rows of pawns in front of pieces, would make it difficult for pieces behind them to get into the action.

more pawns would also make it difficult to create flight squares for the king.  therefore, consider letting the king clobber pawns of its own color.

consider a rook facing a rook with one intervening pawn.  the asymmetry that one rook attacks the other but the other cannot attack back is unsatisfying.  modified variant: when a ranged piece travels through pawns of its own color, it may not capture.

3 or more rows of pawns interfere with knight development.

multiple occupancy is another way for pieces to get through a crowd of pawns.

another variant: ranged pieces can travel through any pieces (not just pawns) of their own color.

Wednesday, January 22, 2025

[xoukpkha] global curvature of square fundamental polygons

a square (or rectangle) fundamental polygon is good for 2D games.

previously on the various spaces (manifolds) that a fundamental polygon can represent, depending on how its edges are defined to behave.

do weird things happen at the corners of the square fundamental polygon for an objects larger than a point (e.g., a sprite) moving around the space?

sphere: Y
torus: N
real projective plane: Y
Klein bottle: N
cylinder: N
Moebius strip: N
hemisphere: Y
square: N

things are not weird if the neighborhood around corners behaves like flat (Euclidean) space.  investigate by tracing a small circle around each corner.  in flat space, we expect a 360-degree circle.  in the answers above, Y = (weird things happen at corners; there is global or total curvature; small circles are less than 360 degrees); N = (corners behave like flat space; circles are 360 degrees).

if you have a fundamental polygon with more edges than a square, e.g., hexagon, you can probably get small circles larger than 360 degrees, some sort of hyperbolic space.  you might be able to get some corners with positive curvature that cancel out other corners with negative curvature for zero global curvature.  but it would still be awkward for games, because local curvature is what we care about for rendering sprites.

even though weird things happen at corners of sphere, projective plane, and hemisphere when drawn as a square fundamental polygon, they are all manifolds (locally Euclidean), so there are other ways of depicting them so that small circles remain approximately small circles throughout, smearing the curvature or weirdness throughout the surface.

or, just put an obstacle over the weird points.

[kufstdwm] alpha-beta with transposition table as a library function

transposition table is the other elegant improvement to minimax (after alpha-beta): elegant in principle, hairy to implement in practice.

consider a generic implementation of alpha-beta game tree search with transposition table, generic enough to be applicable to any user-specified game.  what should be its API?  what features should it provide?

evaluate to infinite depth (possible because of transposition table), returning game value and line (principal variation).  intended for small games.

return the transposition table so that it can be reused for subsequent moves.

evaluate to given depth.  or, user-specified predicate of whether to stop searching, e.g., quiescence search.  quiescence search wants access to the transposition table.

ambitious: because of the many ways game tree search can be customized (for many examples, albeit often poorly described, see the chessprogramming wiki), structure the algorithm as a collection components each of which can be modified and hooked together in various ways.  I have no idea what language or framework could enable this kind of software engineering, though functional programming languages seem attractive as the first thing to try.  but beware that a pure functional programming language such as Haskell easily leaks space for this kind of task, and threading state, the transposition table, though the computation may be awkward.

common customizations sacrifice accuracy (correctness or completeness) for speed.  for example, if two different evaluated positions have the same key (for example, a 64-bit Zobrist hash in chess), one can optimize by doing no transposition table collision resolution; the second position gets ignored, assumed to have already been evaluated.  the default algorithm should not do such optimizations but should allow the user to specify both safe and unsafe optimizations.

allow the search to be augmented with various statistics gathered along the way that get consumed by other user-specified parts of the algorithm.  for example, the move generator could order moves based on values of similar moves already evaluated in other parts of the tree.

provide visibility into how user customizations are working, ways to evaluate whether or not they are worth it.

Sunday, December 29, 2024

[mchseqdd] gluing together CRF

"Convex Regular Faced" is usually applied to polytopes in 4D and above, but it is a useful term for 3D as well, subsuming the Platonic solids, Archimedean solids, the pyramids, prisms, and antiprisms that are uniform polyhedra, and the Johnson solids.

consider a finite subset of CRF polyhedra whose faces have 3, 4, 5, 6, 8, or 10 sides.  these are all the faces seen in the finite categories (not the pyramids, prisms, or antiprisms).  (it is a little surprising that the regular dodecagon is seen only in the infinite categories.)

consider a further subset: eliminate polyhedra which can be constructed by pasting together two or more other polyhedra in this set (pasting only matching faces).  inspired by the partition of Johnson solids between those which can be constructed by "cut and paste" and those which are "elementary".  we seek the elementary CRF polyhedra.

for example, the regular octahedron is eliminated because it can be constructed from two square pyramids glued base to base, and square pyramids are CRF.

is there a unique minimal set?

these elementary polyhedra (replicated as many times as needed) might be a fun set of building blocks.  how should faces physically attach?  given a not-necessarily convex arrangement of them glued by matching faces, determine whether the solid intersects itself.

Wednesday, December 25, 2024

[tazlfpka] business school is finishing school for men who can't do math

quote heard elsewhere.

not knowing anything, an employer is willing to pay a job applicant a maximum of X wage to hire them, for a job that involves math.  but upon learning they have graduated from business school, the applicant's value decreases, and the employer becomes only willing to pay them some amount less than X, because they are probably bad at math, the skill this job requires.  business school graduates might recognize this as a situation in which an MBA confers negative brand equity.

previously, the Nobel-prize-winning cynical description of business school.

Monday, December 23, 2024

[ekxwyhnk] enumerating anisotropic fairy chess pieces

isotropy in chess piece movement is elegant, but because armies start on opposite sides and pawns can't move backwards, forward and backward movement are inherently different in chess.  shogi has this reflected in piece types, for example, the gold general which can advance diagonally but not retreat diagonally.  we enumerate possible fairy chess pieces which are left-right symmetric but not necessarily forward-backward symmetric.  previously on anisotropy.

compounds of deconstructed wazir, ferz, rook, bishop, dabbaba, strong dabbabarider, knight, and alfil.  product of two C-shaped regions around a piece.

inner C: 3^5 = 243
outer C (jumping pieces): 3^3 * 2^6 = 1728

dabbabarider, the only jumping rider we choose to include, grew the outer C from 2^9 = 512.

one can also think of it as symmetries inducing equivalence classes among directions.

there are now 15 variations of knight (not including immobile stone) because of its 4 possible amounts of forward or backward movement.  this includes crab but not pinwheel knight.

total is 3^8 * 2^6 = 419904, a huge increase from isotropic 72.  this includes piece types which can only move backward and piece types confined to their starting rank or file.  perhaps cull these, because they seem practically (nearly) useless unless the game has drops like shogi.

also consider culling multiply colorbound.

raise the total to the Nth power to investigate N-piece endgames.  there is a question of what pawns may promote to (future post mpyfvglu).  finding interesting positions and mechanics will be art.

Sunday, November 03, 2024

[crdxmcet] angular defect of regular polyhedra

degrees missing from being flat at vertex:

tetrahedron 180
octahedron 120
cube 90
icosahedron 60
dodecahedron 36

(angle defect)*(number of vertices) = 720 degree = 4*pi radian, a theorem of Descartes.

by this metric, dodecahedron is the most flat, the least confusing (at corners) for a map of a sphere.  (does that mean it has a lot of distortion inside each face?)  create a tool to display the earth on a dodecahedral net.  drag any point to anywhere on the net and reproject.  also need rotation.  move pentagons to choose among many possible nets.  what countries fit neatly inside adjacent pentagons?  I don't have a good feel of what is the area and extent of 1/12 or 2/12 of a sphere (1 or 2 pentagons).

move portions of pentagons?  the dissection of a pentagon by a pentagram (star) might be useful, as well as the dissection from the center into pie pieces.

vertex-transitive polyhedra have the same angle defect at every vertex.  the Archimedean solids are another (the other?) family of vertex-transitive polyhedra.  by the theorem of Descartes, the most flat therefore is the polyhedron with the most vertices.  excluding the prisms and antiprisms, the truncated icosidodecahedron has the most vertices with 120.  decagon, hexagon, and square meet at each of its vertices; angle defect is 6 degrees.  how much map distortion is in its 12 relatively large decagons?  (30 squares and 20 hexagons are its other faces.  62 faces total.)

previously, pillars of inaccessibility: the tile diagonally opposite you is blank, perhaps annotated with curved arrows indicating edges connect.  moving your immersed character locally induces a different net.  the faces of a net could discretely change adjacency, or walking around a vertex could cause the net to continuously reproject itself, keeping the inaccessible gap diagonally across from you.  not sure if the latter works.

future work: solid angular defect of 4D regular polytopes.

Wednesday, October 02, 2024

[lrjzlhie] navigating a 4D maze with WASD

present a 4D maze as an array of 2D slices.  navigate among cells in a slice with the keyboard arrow keys with the right hand.  navigate among slices with the W A S D keys with the left hand.

also possible are the two thumb sticks of typical game controllers.

annotations (perhaps literally the letters W A S D) in each cell signify which WASD moves between slices are available.  the UI is therefore somewhat noisy.

6D analogously possible in 3D.  (unspecified: how to move in 3D.)  as is the norm for 3D, you can't see the whole maze at once.  2^6 = 64 rooms in a 6D maze of order 2 could make a nice little puzzle.  64 is small enough to memorize.

[vachnlwl] changing square colors every move

knight is the only orthodox chess piece which must change square color every move (parity).  in fairy chess, wazir is another.

for normal movement (not its two square initial move nor diagonal capture), pawn also changes square colors every move.

next simplest are the (0,3) leaper (three-leaper) which obviously cannot reach all squares, and the (2,3) leaper (zebra) which can reach any square.

compose chess puzzles that rely on this parity.  maybe in some chess variant in which all pieces must move every turn.  triangulation is a related technique in endgames.

if a chessboard were colored 4 different colors in a certain way, ferz would also change square color every turn, alternating between 2 of the 4 colors.