Chess is a great game. It’s even better if you’re good at it. Regrettably, I’ve never taken the time to learn chess strategy, so I decided to rely ...
For further actions, you may consider blocking this person and/or reporting abuse
var?????
man this is 2020. almost 2021. come on!
cheers
I've taken Kyle Simpson's (Of You Don't Know JS) course and he has a lot to say about
var
vslet/const
. I don't agree with his thoughts, but it did gave me pause.His stance is that he uses
var
pretty often and the problems people actually had versus what TC39's specified isn't solving the real problems.Again, I'm not super in agreement. But I definitely jumped off the bandwagon of declaring var as evil, and everything should be let/const. I wish I could find a public blog post where he articulates it better. But it's one (of his many) frontend master courses where he goes on that rant.
I'm working in the industry for 8+ years, writing frontend & backend javascript every day - all day since I've been taught.
I cannot mention enough how evil & unpredictable var can be. Especially if your team has a junior or two, it is guaranteed that var will lead you to problems.
I recommend you to replace them. Scoped variables are your friends.
If you insist to use var, I'm gonna tell you "I told ya"
I'm not disagreeing with you. And I can point to my industry experience as well if you want to go there. I'm simply sharing a perspective that made me reconsider my own stance.
And again, I disagree with a lot of his perspectives - but this one was something that made me ponder. Kyle Simpson also points out the reasoning for why he came about that, and I wish I could find the spot in his lecture. It was a fascinating perspective to say the least.
LOL
This is awesome and well written 😉
Next up: Go 👀
Maybe a rewrite in Go lang for faster results :D
Yeaaaah, about that :D
One implementation that I would use to further improve the evaluation is instead of randomizing the moves is arranging them intelligently, in general, moves of pieces with higher values are better, as well as moves that give checks, arranging this could improve even more the execution
Good explanations.
But, I think that as the king can't be taken (the game is over on the previsous move), there is no need to set a high score for the piece. If you set it to 0 it is the same.
He has to so the AI minimax algorithm prioritizes the king
epic🙌
Awesome!
Good... Thank you
learning a lot!, thank you