Search found 3827 matches

by Henk
Fri Jun 26, 2020 10:56 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simplifying code
Replies: 52
Views: 5617

Re: Simplifying code

Made position immutable so now I get this: var nextPos = position.Move(mv); var key = KeyFactory.BuildKey(position.Board); var nextPositionHistory = positionHistory.Add(key); var nextPsqValue = psqValue + position.CurPlayer * mv.PieceSquareDelta(position, PSQTableEval.PieceSquareTable); Actually pos...
by Henk
Fri Jun 19, 2020 12:03 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simplifying code
Replies: 52
Views: 5617

Re: Simplifying code

Now I have this for alpha beta search. Don't like it. Too many if statements. ISearchResult SearchMoves(IChessPosition position, IMovePrioQ prioQ, IVariation initialVariation, int depth, int plyCount, int lb, int ub) { if (!(TimeManagement.SearchExpired(Level)) && (initialVariation == null || initi...
by Henk
Sat Jun 13, 2020 8:31 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: On-line engine blitz tourney June
Replies: 9
Views: 1271

Re: On-line engine blitz tourney June

Maybe do a monthly perft competition for those who have their engine not ready to play games.

O wait if you do a good rewrite computing a perft already a problem.
by Henk
Fri Jun 12, 2020 1:00 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simplifying code
Replies: 52
Views: 5617

Re: Simplifying code

Yes looks better. But I saw a video about monads recently. Although i am not sure I understand it. Don't know anything about category theory. So maybe I could use something like a monad to hide some obvious recurring tests. Monad is a functor plus a flatten operation I understood. Already unfamilia...
by Henk
Fri Jun 12, 2020 12:33 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simplifying code
Replies: 52
Views: 5617

Re: Simplifying code

Yes looks better. But I saw a video about monads recently. Although i am not sure I understand it. Don't know anything about category theory. So maybe I could use something like a monad to hide some obvious recurring tests. Monad is a functor plus a flatten operation I understood. Already unfamiliar...
by Henk
Fri Jun 12, 2020 12:01 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simplifying code
Replies: 52
Views: 5617

Re: Simplifying code

Now I have this for alpha beta search. Don't like it. Too many if statements. ISearchResult SearchMoves(IChessPosition position, IMovePrioQ prioQ, IVariation initialVariation, int depth, int plyCount, int lb, int ub) { if (!(TimeManagement.SearchExpired(Level)) && (initialVariation == null || initia...
by Henk
Fri Jun 12, 2020 8:25 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: On-line engine blitz tourney June
Replies: 9
Views: 1271

Re: On-line engine blitz tourney June

I skip this time. Source code in huge rewrite.
Don't want to participate with an old version because it would play the same as before.
by Henk
Thu Jun 04, 2020 1:41 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Simplifying code
Replies: 52
Views: 5617

Re: Simplifying code

Functional programming is probably best. So every time you make an assignment you should 'apologize'.
Pity that copying a board position is already too costly.
by Henk
Sun May 17, 2020 9:20 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: On-line engine blitz tourney May
Replies: 25
Views: 1660

Re: On-line engine blitz tourney May

I even don't mind 2+1 or less. Just finish the tournament in one hour. If engines are really strong one can't understand 5 minute games real time. So results and games stored is only what counts. The shorter the tournament the less chances of disconnected engines. [My engine only plays stupid moves...
by Henk
Sun May 17, 2020 8:30 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: On-line engine blitz tourney May
Replies: 25
Views: 1660

Re: On-line engine blitz tourney May

I even don't mind 2+1 or less. Just finish the tournament in one hour. If engines are really strong one can't understand 5 minute games real time. So results and games stored is only what counts. The shorter the tournament the less chances of disconnected engines. [My engine only plays stupid moves ...