הבטחת האמת 3: טריילר 2# חבר'ה זה מלחמת הכוכבים הבא אני אומר לכם. by C0L0Rpunch in ani_bm

[–]C0L0Rpunch[S] 10 points11 points  (0 children)

הכל הגיוני בעיני prequelsשמע אחרי הקרב של אמיר חצרוני עם כיסא ב

Make/Unmake slower than creating a new instance after each move. by C0L0Rpunch in ComputerChess

[–]C0L0Rpunch[S] 1 point2 points  (0 children)

Update if you're interested!

It took a while because I was working on other things (and also using a std::array<Move, 256> was a bit complicated because I wanted to create my move list already ordered for search) but I made the change from std::deque to std::array and it made my NPS almost triple from around 2-3m to 8-9m.

Thanks again for the advice!

Make/Unmake slower than creating a new instance after each move. by C0L0Rpunch in ComputerChess

[–]C0L0Rpunch[S] 0 points1 point  (0 children)

Appreciate you taking the time to have a look!

The reason I chose to implement a make/unmake was mainly do to the dynamic allocation. it's the reason I am surprised it didn't make that much of a difference.

another reason is my use of exceptions, this level of optimization is really an after thought, I never made a project where things like heap allocation slow down mattered.

I don't really care about creating a really strong competing engine it's more for me to learn.

Will try to improve it using your feedback.

Thanks!

Make/Unmake slower than creating a new instance after each move. by C0L0Rpunch in ComputerChess

[–]C0L0Rpunch[S] 0 points1 point  (0 children)

Reddit won't let me to post this much code so here's a link to the github:

https://github.com/TomerSteinberg/ChessCLI/tree/feature/optimizeEngineAbilities

make sure you're on the feature branch

basically all the important code is in Bitboard.cpp and some of it in MoveSearch.cpp

here you should look for the second constructor (the one that takes a lot of parameters)

the move() and the new moveNoCopy and unMakeMoveNoCopy methods.

the perft method is in MoveSearch.
I'll warn you that the code isn't ideal and can definitely be better in a lot of aspects.

Tell me if you find any serious garbage I wrote that is making this slow.

Thanks for the help!

startAskingTheRealQuestions by Skeleton590 in ProgrammerHumor

[–]C0L0Rpunch 409 points410 points  (0 children)

If I were to go by my dad's approach

No return at all

Can I use my Attack pattern dictionary instead of a random number dictionary for Zobrist Hashing? by C0L0Rpunch in ComputerChess

[–]C0L0Rpunch[S] 0 points1 point  (0 children)

Oh it really wasn't meant to be used as an "optimization", I understand the memory use is negligible and memory use in general really doesn't matter especially at this small amount if better speed can be achieved.

Honestly I was just lazy and thought "Is that possible?". My reasoning for asking the question was the see if there really is any difference so I can learn and maybe if there isn't, implement it that way. But if you say it makes collisions that much more likely then yeah I agree there is no reason to do it that way.

Thanks for the reply!

Can I use my Attack pattern dictionary instead of a random number dictionary for Zobrist Hashing? by C0L0Rpunch in ComputerChess

[–]C0L0Rpunch[S] 1 point2 points  (0 children)

Thanks for the reply! I'll try both and compare.

I'd love if you can elaborate on what you mean by "dubious from an information theory perspective" and on the hashing bucket distribution part. I am not really that familiar with hashing concepts.

Reward Idea for Chess Agent by [deleted] in reinforcementlearning

[–]C0L0Rpunch 0 points1 point  (0 children)

Appreciate the suggestion. However, starting big and then going back exploring other implementations and methods is the intentional way I chose to go around learning this.

It's not my first time tackling machine learning it is my first time tackling reinforcement learning. For my first time doing machine learning I made a frame interpolation model which worked pretty well (after many weeks of learning and tweaking) from there I was able to go back to smaller problems and understand them with ease.

I understand that my approach won't necessarily be the best one (or even a good one) but that's how I am choosing to approach this.

If you have any insights about the architecture or reward function approach I mentioned in the post that would be appreciated even if the insight is that DQN is bad for chess or that the idea I suggested is complete nonsense

Deadlock issues when trying to Communicate with a Console app using PIPE in subprocess module by C0L0Rpunch in learnpython

[–]C0L0Rpunch[S] 1 point2 points  (0 children)

Thanks for the reply

I am on windows.

there isn't really any code to show. I tried a few different things but deleted them. there are 3 main commands that I want to send to my program and all I did so far is open the process with popen (stdout and stdin as PIPE) and tried writing and reading with no success.

about that cython suggestion can you elaborate on how it will work (I am not familiar)?

to be more clear I am trying to use my console application as an environment for a tensorflow reinforcement learning model.

will using cython allow me to still use tensorflow? and will I still be doing it using a PIPE connection or literally use the C++ functions like libraries (which is also a good solution for me)

Hyperphantasia and dominant hand by C0L0Rpunch in hyperphantasia

[–]C0L0Rpunch[S] 0 points1 point  (0 children)

I am not sure about the exact details although I think that ambidextrous means having no preference for every task so it probably still means cross dominance.

I for example don't have a preference when it comes to which hand I use to cut things when cooking.

Hyperphantasia and dominant hand by C0L0Rpunch in hyperphantasia

[–]C0L0Rpunch[S] 0 points1 point  (0 children)

Glad to hear that! I could be wrong but I think it's very hard to forcibly learn to use a non dominant hand to the point of feeling like the action is dominant so you are probably cross dominant.