ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
andyjpb has joined #picolisp
aw- has quit [Quit: Leaving.]
andyjpb has quit [Ping timeout: 240 seconds]
pierpa has quit [Quit: Page closed]
_whitelogger has joined #picolisp
xkapastel has quit [Quit: Connection closed for inactivity]
xkapastel has joined #picolisp
<Regenaxer> razzy: Being scared is a good thing, makes us more careful. PicoLisp is powerful enough to shoot into our feet
<razzy> Regenaxer: T, there are things i.e. explosives, poisonous chemicals. that are dangerous enough, that should be clearly marked at all times. it is efficient to know when you should pay apropriatte lvl of carefulness
<Regenaxer> right
<razzy> if not clearly marked, you are taking away power from programmer (it is his decision about lvl of carefullness)
_whitelogger has quit [Remote host closed the connection]
_whitelogger_ has joined #picolisp
<Regenaxer> No idea, I thought of them all, but discarded the ideas
<razzy> why?
<Regenaxer> I still have a parallel version iirc
<Regenaxer> Does not improve much
<razzy> where?
<Regenaxer> you should try
<Regenaxer> Somewhere here in the garbage bin
<Regenaxer> moment
<razzy> alfabeta search is weakest spot in my needs right now.
<Regenaxer> http://ix.io/1qNO
<Regenaxer> 2 versions
<razzy> i will test it and study it.
<razzy> thx
<Regenaxer> It think it helps only if you have tens or hundreds of CPUs
<razzy> my biggest bet would be on hashtable
<Regenaxer> I thought so too, it is very easy. But the search tree is not deep enough so you get too few hits
<Regenaxer> to be worth the overhead
<razzy> i would like to go deep
<Regenaxer> But you should try
<razzy> Regenaxer: even if you have persistent hashtable? between matches?
<Regenaxer> persistent within a game
<Regenaxer> Would be good if you try, and measure the differences. Perhaps I'm wrong
<razzy> what do you mean by overhead?
<razzy> computing time? bloated code made hard to read?
<Regenaxer> Maintaining the hash treee
<Regenaxer> not code
<Regenaxer> runtime overhead
<Regenaxer> processing time for the hashes, memory for the tree
<razzy> memory i have plenty
<Regenaxer> you need one cell per hash plus the index tree (1.5 cells)
<Regenaxer> in the cell 60 bits for the hash (Zobrik)
<Regenaxer> But for a depth of 6 you already have 10**9 positions
<razzy> i would not go for zobrick propably
<Regenaxer> no matter
<Regenaxer> you need to hash the positions
<Regenaxer> and at least 2.5 cells per positions
<Regenaxer> 10**9 hashes times 2.5 times 16
<Regenaxer> thats roughly 40 GiB for just 6 levels
<razzy> hmm.
<Regenaxer> Or is there a mistake in my estimation?
<Regenaxer> You need algorithms to decide where to recurse deeper, and what to hash
<razzy> why 16 pls?
<Regenaxer> 16 bytes per cell in PicLisp
<Regenaxer> and an idx tree needs 1.5 cells on the average per entry
<Regenaxer> so 2.5 cells
<razzy> seem awfull much but ok
<Regenaxer> Just try :)
<Regenaxer> Perhaps the pruning is much better, so the overall size is a lot less
<Regenaxer> *probably*
<Regenaxer> The above assumes no pruning by alpha/beta
<Regenaxer> So perhaps only 1/30 or less, so you are at 1 GiB instead of 40
<Regenaxer> but for 7 levels you are at 30 again
<Regenaxer> and fo 8 at 90 GiB
<Regenaxer> But as I said, perhaps I underestimate the pruning rate
<Regenaxer> perhaps it is much better
<Regenaxer> Try it! :)
alexshendi has quit [Read error: Connection reset by peer]
<razzy> i would try hard maximum 4GB for hash table. and decision algorithm would be try remember randomly, keep remembering only what is usefull
<Regenaxer> It is a good exercise anyway
<razzy> and make it persistent over matches
<Regenaxer> yes, in the DB
<Regenaxer> But if you keep several matches, it gets *really* huge
<razzy> Regenaxer: i would hardcap size
<razzy> thinking of it, it is universal speedup
<Regenaxer> (doc 'cache) memoizing
<Regenaxer> see misc/fibo.l
<Regenaxer> the cached version is by far the fastest
<Regenaxer> but there the index is small
<razzy> and it is not persistent :]
_whitelogger has joined #picolisp
<razzy> cache remember all results right?
<Regenaxer> yes
<Regenaxer> BTW razzy, are you a good chess player? I'm not, but I would like to know first of all whether this program plays correct chess and does nothing obviously stupid
<razzy> Regenaxer: i am not good player, but i think i can recognise good chess :]
<Regenaxer> great :)
<tankf33der> Regenaxer: you know it always plays petrov”s defence?
<razzy> and i test programs against humans and other programs :]
<Regenaxer> Please look if there is an obvious mistake
<Regenaxer> tankf33der, no, I don't even know petrov's defence
<Regenaxer> It uses a very simple "opening book"
<Regenaxer> onld d2-d4 or e2-e4 iirc
<razzy> tankf33der: picolisp program would be bad at opening and ending sequence
<Regenaxer> the rest is computed
<Regenaxer> ok
<razzy> why have openning book at all :]
<Regenaxer> good question, try without
<razzy> opening book make sense if you want to practise different openings
<razzy> i do not understand cost function yet
<Regenaxer> It is mainly material
<Regenaxer> and a little control of center
<Regenaxer> (iirc)
<Regenaxer> and material is mainly exchange (you remember the attackers lists)
<razzy> i want to try cost function (fields_I_can_go)-(fields_enemy_can_go) where you are equally happy if you imobilise opponent :]
<Regenaxer> perhaps, but "imobilise" means the opponent has less control over the center and attacks less fields ;)
<Regenaxer> so you are at the same
<razzy> simpler notation
<razzy> better performance at weird scenarios. i hope
<Regenaxer> I think the cost function itself is rather cheap
<Regenaxer> you could profile it with @lib/prof.l perhaps
<Regenaxer> It is cheap because the attack lists are built and rebuilt during moves
<Regenaxer> so the moves are expensive
<razzy> Regenaxer: i meant chess performance, computer performance would be wors
<Regenaxer> ok
* razzy is comming and going, doing breakfast and stuff
<Regenaxer> right, the cost function should be as intelligent as possible
<razzy> 2 ways to good performance. depth and cost function
orivej has quit [Ping timeout: 245 seconds]
xkapastel has quit [Quit: Connection closed for inactivity]
<razzy> btw, slight imho unoptimal moves picochess made was with unforced king hiding in corners. and disregard for chessboard control
<Regenaxer> OK, I did not mean chess logic, this depends on the algorithm. I meant correctness of implementation (eg. wrong attack lists resulting in bad moves). Hard to detect of course
<razzy> super hard, especially if i do not understand it yet :]. how would i know if it is bad implementation or performance optimalised aproximation :]
<Regenaxer> If it makes an obviously stupid move, due to miscalculation
<Regenaxer> ie. if it results in a worse material situation in less than *Depth plies
<Regenaxer> yes, super hard ;)
<Regenaxer> super hard to find the program bug, but perhaps easy to *spot* if it is reproducible
<razzy> i will test it for a while than :]
<Regenaxer> Thanks! No stress, just if you see something by chance
<razzy> if cost function can be reduced to material count, than it is ok :]
<razzy> easier to look for
<razzy> to be honest, those attack simulations seem like waste of resources and place to make bug
<Regenaxer> yes, perhaps
<Regenaxer> I'm not sure if the time to maintain them is really so much less than calculating them completely new in each call to 'cost'
<Regenaxer> But I believe in most situations are
<Regenaxer> eg if just a pawn moves, not much needs to be recalculated
<Regenaxer> if a queen moves, almost the whole board recalculates of course
<razzy> if you have complex cost function, it is hard to reason about. i do not know
<razzy> i could imagine incremental recalculation of board position with my simple cost function
<razzy> but it is most complex improvement
<razzy> i would say last step
<razzy> and with all improvements i could look 40 moves ahead with reasonable reliability
<razzy> not 100% search but 95% :]
<Regenaxer> 40 moves needs a *lot* of improvements
<Regenaxer> impossible
<Regenaxer> It is a whole game
<razzy> it is definitelly possible to look 40moves ahead if you are willing to prune search tree really hard
<razzy> which decrease reliability
<razzy> you could look 40 random moves ahead no problem. less random more problem
<razzy> willing to bet? all improvements would take me year and i would ran out of money :]
<Regenaxer> I believe ;)
<tankf33der> Regenaxer: i was wrong
<tankf33der> pil32 doesnt compile on x64 out of box
<tankf33der> pkg required too
<Regenaxer> ok, I see
<Regenaxer> but no problem anyway
orivej has joined #picolisp
razzy has quit [Ping timeout: 268 seconds]
orivej has quit [Ping timeout: 252 seconds]
razzy has joined #picolisp
xkapastel has joined #picolisp
<razzy> hmm, paraelism does not help much
alexshendi has joined #picolisp
<razzy> but processor workout is nice from time to time.
<Regenaxer> Yes, as I said, does not help much
<razzy> the search tree is massive pain
<razzy> pruning than
<razzy> 0-4 depth consider all options. deeper consider (100% - (15%*(depth-3)))) top scored options.
<Regenaxer> I think this does not help, you will lose this *good* move
orivej has joined #picolisp
<Regenaxer> The good move may be the one that looks bad the first 5 moves and then suddenly turs out to be the winning one ;)
<Regenaxer> or perhaps for the first 10 moves, who knows?
<razzy> well, nobody knows. that is why you estimate propability from score
<Regenaxer> afp
alexshendi has quit [Ping timeout: 240 seconds]
<razzy> for debugging is better to do not loose potential good moves :]
<razzy> Regenaxer: not really bug as i see it, picochess player do not considerate pawn promotion. not sure if picochess even do pawn promotion, propably not.
<Regenaxer> Oh, it should
<Regenaxer> It tries Queen, then Knight
<Regenaxer> Other pieces make no sense I think
<razzy> in clasic chess you are right
<razzy> i may test it more, maybe i have some old version. where do i look for pawn promotion?
<Regenaxer> The program did not change for 10 years
<Regenaxer> only cosmetics
<razzy> it does not consider promotion in 2 cases, i can test more
<Regenaxer> tryPawnMove
<Regenaxer> the else part
<razzy> to look for?
<Regenaxer> Seems it considers more: (for Cls '(+Queen +Knight +Rook +Bishop)
<Regenaxer> ie also rook and bishop
<Regenaxer> if the 2nd arg is NIL, it reached the last row
<Regenaxer> so it tries promotion
<Regenaxer> Did not work?
<Regenaxer> I don't remember if/how I tested
<razzy> i will test manual promotion, than computer promotion
<razzy> will return with answer
<Regenaxer> thanks!
<razzy> maybe not today :]
<Regenaxer> No hurry, after all the years
<razzy> :D
<Regenaxer> Seems I wrote it in 2005
<Regenaxer> Then no substancial changes after that
ubLIX has joined #picolisp
alexshendi has joined #picolisp
orivej has quit [Ping timeout: 252 seconds]
alexshendi has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
alexshendi has joined #picolisp
groovy2shoes has quit [Excess Flood]
groovy2shoes has joined #picolisp
ubLIX has quit [Quit: ubLIX]
<razzy> Regenaxer: so, i tested it. pawn promotion works. manual works. even AIplayer consider it. buuuut it propably does not recognise increase in material after promotion. because it largely ignore promotion option.
<razzy> glad i could help
<razzy> Regenaxer: eeeh,.. i was maybe premature. sorry, wait a bit
freemint has joined #picolisp
freemint has quit [Remote host closed the connection]
freemint has joined #picolisp
razzy` has joined #picolisp
razzy has quit [Ping timeout: 252 seconds]
ubLIX has joined #picolisp
razzy` has quit [Remote host closed the connection]
razzy` has joined #picolisp
rcs_ has joined #picolisp
orivej has joined #picolisp
alexshendi has quit [Ping timeout: 244 seconds]
razzy`` has joined #picolisp
razzy` has quit [Ping timeout: 252 seconds]