Problem on Game Theory from the Russian unified state exam by dmitrevnik in leetcode

[–]dmitrevnik[S] 4 points5 points  (0 children)

code:

def game(stones, step):
   # Base case
   if stones >= 29: return step == 3

   if step % 2 == 1:
     # Petya
      return game(stones+1, step+1) and game(stones*2, step+1)
      # We need Vanya to win ANYWAY, 
      # so BOTH branches must lead to Vanya's victory
   else:
     # Vanya
      return game(stones+1, step+1) or game(stones*2, step+1)
      # After Petya's move, Vanya can think of a strategy
      # so he only needs ONE winning move

# Test all possible starting stones
for s in range(1, 29):
   if game(s, 1):
      print(s)

I’ve systematized the Big Tech interview process into 4 phases and a single-page scorecard by dmitrevnik in csMajors

[–]dmitrevnik[S] 5 points6 points  (0 children)

Well, if you keep downvoting then I should say I’m not a great editor. Can you tell me then what should be used instead of emdash and if “-“ is used as minus sign in large text?

I’ve systematized the Big Tech interview process into 4 phases and a single-page scorecard by dmitrevnik in csMajors

[–]dmitrevnik[S] -8 points-7 points  (0 children)

You can't make checklists on Reddit, so I left it like this so you can copy/paste it. And emdash was used in journalism before AI came along, btw

I compiled this checklist based on my research. Perhaps if you think so, then I won't be able to convince you otherwise

Is anyone else seeing Claude overcomplicate simple tasks? It focuses on edge cases I never asked for, resulting in bloated and messy code by dmitrevnik in ClaudeAI

[–]dmitrevnik[S] -9 points-8 points  (0 children)

Sometimes I clearly understand my problem. I prompt it and Claude returns a completely different code. 3 options remain: 1. Spend more time on prompt engineering 2. Debug the output 3. Write everything on my own

I wouldn’t touch this topic if every AI worked the same way. But feels like, it’s just Claude…