Python Forum
t_games, Take Two - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Game Development (https://python-forum.io/forum-11.html)
+--- Thread: t_games, Take Two (/thread-15228.html)

Pages: 1 2


t_games, Take Two - ichabod801 - Jan-08-2019

I redid the code. It should run solo now (that is, outside the Python path). At least that's what it's doing on my machine.

As before, you can provide feed back here, or I set up an email just for this project: t_admin at xenomind dot com.


RE: t_games, Take Two - metulburr - Jan-09-2019

I can play with it in depth later, but i made a pull request to your repo. I was just checking to see if it worked now. After this fix it works. From what I see it looks sweet. I didn't know you had AI players. Cool


RE: t_games, Take Two - ichabod801 - Jan-09-2019

(Jan-09-2019, 12:42 AM)metulburr Wrote: I didn't know you had AI players.

Yes, well, some of them need work, and some of them are rather slow.


RE: t_games, Take Two - ichabod801 - Jan-09-2019

(Jan-09-2019, 12:42 AM)metulburr Wrote: I can play with it in depth later, but i made a pull request to your repo.

I merged metulburr's pull request. If anyone wants new compressed files, let me know and I can make a new release.


RE: t_games, Take Two - Trinx - Jan-12-2019

I download the zip on the top of this page, that was the correct file, right? I'll try it all out tonight.


RE: t_games, Take Two - ichabod801 - Jan-12-2019

(Jan-12-2019, 04:39 PM)Trinx Wrote: I download the zip on the top of this page, that was the correct file, right? I'll try it all out tonight.

That zip file still has the error that metulburr found. This zip file has the corrected code.


RE: t_games, Take Two - Trinx - Jan-12-2019

(Jan-12-2019, 05:56 PM)ichabod801 Wrote:
(Jan-12-2019, 04:39 PM)Trinx Wrote: I download the zip on the top of this page, that was the correct file, right? I'll try it all out tonight.

That zip file still has the error that metulburr found. This zip file has the corrected code.

Yeah, it wasn't working for me. I'll try that one out Smile How did you create an AI player?


RE: t_games, Take Two - ichabod801 - Jan-12-2019

(Jan-12-2019, 10:16 PM)Trinx Wrote: How did you create an AI player?

I created lots of AI players. There's a base Player class, and there is a whole hierarchy of sub-classes to it. One is the Human class which is used for the user. Another sub-class of Player is the Bot class. All of the AI players are sub-classes of the Bot class, and there are usually more than one per game. Most of the bots are heuristic, just using per-programmed rules to determine their behavior. The Connect Four bots do a full tree search, with alpha-beta pruning (there is a parent class AlphaBetaBot, so other bots can make use of the algorithm). They're kind of slow, mainly due to the board copy method. I want to look into speeding that up. The bot for Backgammon was done using genetic engineering, although I think it needs a bit more engineering and maybe another genome, but I didn't have time for that.

Since Bot and Human are both sub-classes of the same class, and use the same methods, you don't need a human. Each game has a tournament method for running contests between different bot programs. On the flip side, there is a Cyborg class, with some features of both the Bot and Humanoid class. The Cyborg can be used to play both sides of a game while you are programming it, to make sure the game works before you write AI players for it.


RE: t_games, Take Two - Trinx - Jan-13-2019

Hmmm, for some reason the games aren't working for me. Here's what I'm getting:

Error:
Traceback (most recent call last): File "C:\Users\Thorin\Desktop\t_games-0.36.0a4\player.py", line 32, in <module> from . import utility ImportError: cannot import name 'utility'
Why do you think this is happening? The AI is pretty cool, I'm gonna look at how you wrote it and try doing it myself.


RE: t_games, Take Two - ichabod801 - Jan-13-2019

How are you running it, and what version are you using?