5 ms·
The bot is not very good, unfortunately. It's mainly useful to help understand the rules, as in your case. If you're interested in playing with an experienced p
by Kharacternyk 3y ago
The bot is not very good, unfortunately. It's mainly useful to help understand the rules, as in your case. If you're interested in playing with an experienced player, ping me at nazar@vinnich.uk :)
> Which is the standard lenght of the turns?
The usual setup is a 10×10 grid with 3 moves per turn. More moves means more interesting manoevres are possible. I like 7 moves on 12×12.
- gus_massa 3y ago> It's mainly useful to help understand the rules, as in your case. I agree. [spoiler alert] I tried with 2 or 3 moves per turn. My strategy was to advace in diagonal to have a lot of space in tha back, and keep some distance from the oponent. When it advances, I wall the pieces. If it doesn't advance I fill my backshard space. With 2 or 3 it's humanly learnable in 10 minutes. I imagine that 7 moves would be much ore complex, but sadly I have no time now. Perhaps you can progem the bot to advance more in the first few turns. (Assuming my strategy is good.)
- Kharacternyk 3y agoYour strategy is definitely good — capturing territory to fill it later when advancing doesn't make sense is important. 7 moves are more complex, but much less so when playing against the bot. Your suggestion about making the bot eager to advance makes sense, thanks. Hope you'll play a few times against a human opponent in the future:)
- gus_massa 3y agoTwo small sugerstions: * Make a small pause as if the bot is thinking each move. Probably .1 or .2 seconds is enough and not boring. We made a few games a long time ago, and a small pause makes it easier to understand the rules. * When the game finished, I still can see my token as if I can draw it. It's very confusing until I notice the congratulations message. Don't show the token whe the game ended.
- leowwwa 3y ago[flagged]
- Jorge1o1 3y agoSo the source code of the bot is here: https://github.com/Kharacternyk/paper-tactics/blob/master/paper_tactics/entities/game_bot.py https://github.com/Kharacternyk/paper-tactics/blob/master/pa... It seems like there's an evaluation function but there's no state search / recursive minimax tree for the bot. I think if we added a 10-ply lookahead minimax algo for the bot here it would be pretty good. [1] I will probably do it myself if I end up having a bit of free time this weekend. [1] https://en.wikipedia.org/wiki/Minimax#Minimax_algorithm_with_alternate_moves https://en.wikipedia.org/wiki/Minimax#Minimax_algorithm_with...
- quickthrower2 3y agoGood old Alpha Beta pruning. I have a real mental block whenever I try to code that algorithm!
- tmountain 3y agoMonte Carlo tree search is another “easy” way to build a decent AI for a game. I love it because you simply define the rules of the game in a purely functional way, and it does the rest. https://en.m.wikipedia.org/wiki/Monte_Carlo_tree_search https://en.m.wikipedia.org/wiki/Monte_Carlo_tree_search
- radarsat1 3y agoI was wondering about the architecture because I want to be able to make little games like this, so I'm super happy to see the source here, thanks for posting it! And looks like you put a lot of thought into the architecture too, going to study it.
- solidr53 3y agoSeems like a great opportunity to train a neural network model for bot. There is a good article on tic tac toe for a base https://nestedsoftware.com/2019/12/27/tic-tac-toe-with-a-neural-network-1fjn.206436.html https://nestedsoftware.com/2019/12/27/tic-tac-toe-with-a-neu...
- im3w1l 3y agoI'd say the bot is very weak. My first game I had no real idea what I was doing. Half the game I thought I had to maintain contact with my starting square or lose, until I managed to wall in my opponents starting square and didn't win. Then I tried to make as many walls as I could because I didnt like my pieces being captured and walls seemed more solid. Suddenly it said I won and I was like wait how, turns out I had managed to turn every circle into a wall except the walled in starting square.
- Kharacternyk 3y agoYes, very weak is probably a better description. I haven't learnt the theory behind AI opponents properly yet, so this bot is essentially a weighted random choice.
- im3w1l 3y agoNow I feel negative. The rest of the implementation was very nice. Pretty ui and everything worked well.
- gus_massa 3y agoMy guess is that for 1, 2 or 3 moves per turn it's possible to make a bot that looks ahead 2 or 3 rounds using brute force and then use AB pruning to pick the best move. With 7 moves per turn the search space is too big and it looks difficult. I tried a few games with neutral pieces, and it' move difficult to beat the bot.