>he can't implement chess AI
Noob
He can't implement chess AI
Other urls found in this thread:
en.wikipedia.org
youtube.com
ics.uci.edu
zero.sjeng.org
youtube.com
en.wikipedia.org
imdb.com
en.wikipedia.org
twitter.com
>he can't do thing i just learned
lmao brainlets
>caring about solved games
1 get all possible moves from the present state
2 find the path that has the most winning end nodes
3 take that path
4 goto 1 while waiting for opponent's move
You can waste your time implementing an ai or you could convince two players they are fighting an ai while they actually are pitted against each others.
It's just a matter of implementing minimax algo. Nothing hard. Stop trying to make yourself feel smart.
How the fuck can it be a solved game?
>calculate billions of possible moves in the current turn and each subsequent turn for yourself and opponent
>easy peasy
brainlet detected.
def make_move(valid_moves):
return random.choice(valid_moves)
Fight me
Beatable by even the most dumb players
Way too easy
lol, imperativelet
this is how you do it with lazy evaluation:
1) write function that generates tree of all moves
2) write function that walks the tree and searches for the optimal move
>there are 169,518,829,100,544,000,000,000,000,000 ways to play the first ten moves of a chess game.
yeah bro excellent idea.
It could beat anyone in the world given the right picks.
>tree of all moves
You can't do that. You need to trim the tree substantially or you're just going to recurse until the end of time
t. Brainlet
import time_travel
def make_move(valid_moves):
while True:
move = random.choice(valid_moves_
if time_travel.winning_move(move):
return move
ImportError: No module named time_travel
Woops
from __future__ import time_travel
There's practically zero chance of that.
Pick up a chess board. Make random moves with one side and make proper moves (level 1 AI will do it) with the other. You can play this game until the end of time and the random side will always lose. Like, guaranteed. The set of coincidences that would need to happen for a random player to win even once against a level 1 AI is absolutely enormous.
So? It could still beat anyone with some luck.
11/10 works
>This is how people design software nowadays
We're not talking some luck, we're talking degrees of luck on the order of hundred billions against 1.
en.wikipedia.org
The guy you are responding to is wrong though. Computers outplaying humans is not sufficient nor necessary for a game to be solved.
Chess is not solved. Many simpler games have been.
Don't sweat the details, it only needs to work once.
1. and 4. implies a "permanent brain".
2. Implies there's a single best move, but that's not possible because the evaluation is done before the opponent's move (see 4.)
Your solution is flawed and it doesn't even tackle human psychology and offers a draw in a losing position.
That's an upstream problem.
Exactlt.If chess was solved an ai could beat ubsupervised learning AlphaZero at chess but they can't. Stockfish lost
>#include chess.ai
>you fucking goddamn nooblets
>jesus christ
>why must you reinvent the wheel every goddamn fucking time
>please learn
>please
>just learn
daily reminder that chess programming has literally not made any advancements ever since IBM's deepblue
youtube.com
it's literally just
>try lots of moves
>count pieces at the end (somewhere reasonably deep in the search tree)
THATS FUCKING IT. brute force, no "intelligence" anywhere to be found.
those lazy snob chess programming monkeys doing their garbage iterative deepening "frameworks" with aggressive forward pruning and killer heuristics can suck a DICK.
chess has a laughable branching factor and a trivial evaluation function, it's LITERALLY tictactoe-tier AI development.
Im glad those stupid gits got BEE TEE EFF Oh'd by alphazero. they have done nothing to advance computer science, just literally using 30 year old algorithms over and over and patting themselves on the back on how many positions their modern computers can mindlessly crunch in a millisecond.
>chess
>solved
There are 400 different possible positions after one move each. There are 72,084 different possible positions after two moves each. There over 9 million different possible positions after three chess moves each. There are over 288 billion different possible positions after four moves. The number of just 40-move games? Greater than the number of electrons in the observable universe.
>takes fun thing
>makes machine to do fun thing automatically
>now can't do fun thing anymore because machine is better at it
Well done.
Im informally doing/following a c++ course at my university that just ended this past spring. I believe I have to do what you said for this project (with the game Othello instead)
Won’t there be too many trees to recurr through? How do I choose the best one for the next move?
Here is the project guidelines, forgot to add
>not Monte Carlo Tree Search
My dad had this on his Atari 800. The AI was pretty much of a joke.
All the atoms in your body could simultaneously stop existing with some luck. But unfortunately, that doesn't seem to be happening, so you'll just have to kill yourself.
>Not Monte Carlo Tree Search
>Not Minimax algo
>Not Spanning Tree Routing Search
>Chess Search is a thing that literally exists
There is already an engineered algo for chess what the shit are you people even talking about this non-optimal search bullshit
If it doesn't fall for a Fool's Mate it's fine by me.
1. g3+ hxg3
2. Rf3+ Rxf3
3. Ng2#
ng2, kf3 what now?
>chess
try implementing shogi AI
there's a black rook on f3 (he had to capture the rook after the check. there was no other move)
>shogi
try implementing Go AI
Is this Kasparov vs DeepBlue, 1996, game 1?
Computers can count further than that.
I implemented minimax for a small game, should be similar for chess but much more work to get move generation and game logic
so fuck it
also 1850 USCF here suck my class A dick
t. brainlet
shogi already requires machine learned eval and specialized DFPN mate search
fun fact: adding mate search to a western-chess engine significantly decreases its elo. really shows what kind of a boring game (western) chess is
Thank you mister Robot
Buy a better computer, nigger.
there is an open source alphazero: zero.sjeng.org
Minimax is optimal. Learn game theory brainlet.
>chess with bad graphics
but only a handful of them are correct and chosen by decent players you fucking retard, like there are a million ways to drive to work but that doesnt mean I drive my car through neighbours back yards and do a 500 mile detour.
It's not just "brute force", but rather a good searching algorithm
>she can't implement a Starcraft AI
Ultimate pleb
>he hasn't heard of Alpha Zero
> Slow Learner
just accept you’re below average and move on
I can implement a chess AI, just not a very good one.
>adding mate search to a western-chess engine significantly decreases its elo
If it isn't true for shogi, why? It seems like something that should be the case for all chess variants with checkmate.
>picture of alphago
>last paragraph is exclusively about alpha zero
nigga learn2read
>It's not just "brute force", but rather a good searching algorithm
>good searching algorithm
>basically just minimax, the most primitive algortihm you can think up
wow, very algorithm, much computer science
Video Chess for the Atari 2600 is amazing. As in, it's amazing that it works at all. The thing has 4K of ROM and 128 bytes of RAM to work with.
At least the cutscenes are impressive.
youtube.com
now implement go ai
kek
>boring game (western)
>If it isn't true for shogi, why?
shogi has drop rule, so the game becomes tactically *sharper* as it goes on, and 99% of games end in a race to checkmate where the side who can checkmate the opponent with a series of consecutive checking moves will win.
en.wikipedia.org
thats why shogi players practise mating problems (tsume shogi) and shogi engines have dedicated mate search
western chess usually doesnt end in a mating attack, but rather in a position where either it's a draw, or one side ends up significant material ahead and will trade down to a winning endgame like King+Rook vs lone King or something like that.
underrated post
That guy needs to be sedated and sent back to basic training.
>karolina no shogi
huh
correct term is 'scribble chess'
That would be fucking hilarious
lol