You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not really connected to the bot yet. But you can play against the machine by runing irb and
ruby
require './connect_four.rb'
cf = ConnectFour.new
cf.next_step([column number indexed from zero of the move you want to make])
It is slow as hell. It does a depth first search of all possible boards 4 moves away and does a board evaluation. that's 7^4 or 2401 board evaluations and it doesn't do a good job either. lots of room for improvement.
The text was updated successfully, but these errors were encountered:
I don't think you committed anything. Additionally, are you using minimax? I don't imagine minimax would take so long that you would describe it as "slow as hell." It's slow, but not that slow.
Yeah I think that's what you call it. And no it shouldn't be that slow. Yet it is very slow so I'm messing something up. I'm pretty sure I know of a few places where I can improve it I'm just not that great at ruby so it would be nice if someone took a look.
Yeah I guess I didn't commit it. It's committed now
Well it's working pretty well now. Only missing feature is the tope of the game. there is no checking for hitting the top of the board. There are also no tests. But I don't think they make any sense anymore since I don't envision future development on it and I don't really know how to test that an AI plays well other than to play against it (It kicks my but right now).
I was inspired by LPMC's tic tac toe game and created a connect four game.
repo
It's not really connected to the bot yet. But you can play against the machine by runing irb and
ruby
require './connect_four.rb'
cf = ConnectFour.new
cf.next_step([column number indexed from zero of the move you want to make])
The text was updated successfully, but these errors were encountered: