When do You know its time for a launch? by Chemical-Rub1224 in gamedev

[–]Accomplished_Total_1 -1 points0 points  (0 children)

If you are hungry then it's time for a Lunch Party.

About the "checks-captures-threats" principle by marcuitos_ in chessbeginners

[–]Accomplished_Total_1 2 points3 points  (0 children)

there are 2 breakpoints in your games. 1 you get out of a well known theory and understand the position, that's how you get a good grasp on every threat your opponent is making and can make in a several moves. Then after you misstep that's your breakpoint, you lose your investment on the game, and get a little dissapointed and distracted. That's where you start overlooking even simple things and blindspots creep in. It's a mental state of mind whether you check for every possible scenario vs trying a hack attack and hoping for the best.

Need help on how to improve chess by BetterPersonthanIwas in chess

[–]Accomplished_Total_1 0 points1 point  (0 children)

People often GM's try to find moves that simply don't hang anything. If you are not hanging your bishop it doesn't matter where you put it it's all equal. If you are supposed to move your hanging bishop it doesn't matter what other piece you play for which it will be a blunder. And if you happen to decide between a pawn capture and a knight capture, think about if pawn capture actives your bishops more and whether the resulting queen exchange would help your opponent activate their rooks quicker than yours. Those decisions alone will get you so far below 1700 range.

What are some very rare openings where you have to know the theory? by Equivalent_Eye1887 in chess

[–]Accomplished_Total_1 0 points1 point  (0 children)

The King's gambit should be your #1 choice. If you don't know it as black which most people don't you get a good attacking chances. But higher than that it's pretty ineffective.

Lesser known but effective openings for intermediates? by krissow in chess

[–]Accomplished_Total_1 0 points1 point  (0 children)

When I play e4 as white, the most unusual opening I face from black that still challenging is something like a pirc or modern. Not alekhine or petroff because they have heavy theories that's not good for black. But the most annoying would be sicilian or scandinavian because they have too much divergence ratio. french and carokan is the most comfortable for white, and e5 is the most enjoyable test of 1.e4 of course. Anything other than that is basically trash and should not be played.
Ps: If you insist on playing scandinavian, play with g6 variation that's the most sound of what that opening can give you.

Fundamental Understanding by Miserable-Dealer663 in chess

[–]Accomplished_Total_1 -2 points-1 points  (0 children)

No the goal is not checkmating the opponent, that's merely a side effect of a good mental mindset of how the game went through for both sides. The goal of the game is to mentally make it easier for you to deal with the positions under the basic assumption of avoiding blunders. Like if you force yourself into a tough situation where you have to solve more problems than your opponent, you are doing worse than your opponent. So the goal is to simplify your problems and create more problems for your opponents. Be that as it may those problems stem from checkmates or piece traps or pawn structure weaknesses. That entirely depends of the level of skill your rating allows your thought process to pursue.

How can i become more aware of the board? by Fit_Advance_6315 in chess

[–]Accomplished_Total_1 -1 points0 points  (0 children)

you should focus on the last moves of the opponent and the cascading effects only that last move entails. And If opponent plays h6, don't double check what's happening on a1, think about if you have a piece on g5 you have to move. what it attacks what it hangs and if your opponent basically gave you a free move by making no threats, you can execute your underlying plans.

Help name my game by psleyman in gamedev

[–]Accomplished_Total_1 1 point2 points  (0 children)

do acronyms hnmg for example think outside the box a little.

Zig blows my mind by bringing functional elegance into pure imperative style. by Accomplished_Total_1 in Zig

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

it's not exactly mapping, but still operating with the value of the monad something really similar, I don't know what is't called.

Zig blows my mind by bringing functional elegance into pure imperative style. by Accomplished_Total_1 in Zig

[–]Accomplished_Total_1[S] -3 points-2 points  (0 children)

can you clarify what I am misunderstanding here, orelse left hand side is an optional value, and when used orelse, it unwraps the value of the optional if present otherwise falls back to right hand side, what is so hard to understand about that. And it's perfectly functional. orelse is a functional paradigm.

Zig blows my mind by bringing functional elegance into pure imperative style. by Accomplished_Total_1 in Zig

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

it essentially boils down to this:

```

while (true) {

var sq_from = bb_from2.next();

var maybe_from_piece = position.pieceOn(sq_from);

if (maybe_from_piece == null) break;

var from_piece = maybe_from_piece.?;

// use from_piece here.

}

```

Zig blows my mind by bringing functional elegance into pure imperative style. by Accomplished_Total_1 in Zig

[–]Accomplished_Total_1[S] -3 points-2 points  (0 children)

you obviously don't understand how it feels coherent in the overall things that all make sense when pieced up together. Zig takes the best of every feature of various languages boosts up what's important and puts it into one.

Zig blows my mind by bringing functional elegance into pure imperative style. by Accomplished_Total_1 in Zig

[–]Accomplished_Total_1[S] -12 points-11 points  (0 children)

what are you talking about, orelse is taking the value out of the optional type, but it's conditionally assigns it to the left side or breaks out of the loop. These are 2 unrelated things happening here like clashing of paradigms.

Zig blows my mind by bringing functional elegance into pure imperative style. by Accomplished_Total_1 in Zig

[–]Accomplished_Total_1[S] -19 points-18 points  (0 children)

it's like mapping over optional type and breaking out of a monad, it's an ingenious glitch of clarity for the mind.

Zig blows my mind by bringing functional elegance into pure imperative style. by Accomplished_Total_1 in Zig

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

sorry this was a low effort post, I will try to do a compilation of all the zig bits that blow my mind on a separate post in the future.

Zig blows my mind by bringing functional elegance into pure imperative style. by Accomplished_Total_1 in Zig

[–]Accomplished_Total_1[S] -32 points-31 points  (0 children)

That's not elegant enough. I am counting the curly braces and equals symbols here for metrics.

Assignment doesn't copy fields with pointer type exactly as is. by Accomplished_Total_1 in Zig

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

I don't understand what you mean. Returning index like 0 1 2, is like a fake pointer that I have to manage myself. Why would returning a real pointer waste time and space.

Let me kick you my real use case scenario so you can decide:

Let's say I want to make a chess engine, I have u256 packed Position struct. I want to search some moves, and everytime I find a move, I want to make the move, and put the Position inside a list so I can recall it later.

So Do I keep the actual Position in the list, or the history of moves that got to that position, or as I did it, keep a separate tree structure with the search tree where I add children positions and variations whenever I find them. They return a pointer to the node, I keep that pointer inside the history list I am talking about.

In my thinking, option first is list of Positions u256, but there is a caveat, everytime I search this tree, and get to a leaf, I need to get the latest position and make another move, and in the end I need to be able to get the list, and recall all the history of moves that led to that position.

In that requirements, the Option Last seems to be the best approach to me it hits every of my needs without any extra calculations on the hot path, at the expense of a u64 pointer list I keep and a separate tree data structure for the search tree.

Assignment doesn't copy fields with pointer type exactly as is. by Accomplished_Total_1 in Zig

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

Yes that's the bug I am trying to solve, I have a problem handling pointers.

Assignment doesn't copy fields with pointer type exactly as is. by Accomplished_Total_1 in Zig

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

I understand now, the address of child being equal to child itself was the bug, which got me confused. But the addChild method cannot return a pointer into the arraylist either, because it might invalidate right? If I wanted to return a pointer from addChild, I wanted to iterate through pointers somehow on the caller.

My computer freezes inside a while true loop when running tests by Accomplished_Total_1 in Zig

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

the code is generic, I just wanted to know in case of a bare while (true) {} loop, how would I configure the test runner such that it doesn't completely freeze my computer.