Since my last post, I’ve finished a restructure of my original code and moved and then moved a lot of the game functionality into the new board.py. Since the player object referred to the player character, it was getting a bit large having all of the games functionality in it as well. Now, the player object gets its own board object to reference, which runs all of the game mechanics, leaving the player object to focus more on the ways that the player interacts with it.

After more debugging, I got that working and then started to work on a logging file for the game. That’s currently the project I’m working on. So far I’ve made decorators that will probably need some debugging, but will go into all of the different moves and record the type of move that was made into a list of the logging file. So far, that’s all I have as this week and last have been really busy with final school assignments and I still have a couple papers left to write. I’m a little nervous that I wasn’t able to do more, but after Sunday all of the school work will be done and will have a few weeks to work more than I could previously.

I’ve learned a lot so far, but still have a few things I’d like to do before presentation time. Step one is finishing up the logging system. I plan to do it by using the decorators to append to lists in the jsonlog.py file, and then at the end of the game use a function that will take the variables from those appended lists and make a JSON file of game data. The next step after that will be a file that takes the win results and move and makes a log showing each move and how many times its led to victory. This will create a way of keeping data from logs, while being able to delete specific game logs when there are too many. Finally, a new version of my computer players will reference this list and use those numbers to determine which cards lead to winning more often and then make the best move by those standards, after an initial data set of random moves.

I might start it off by only having the program use this for summoning and then branch it off to do more, as a way of starting small and building up. Though time is starting to run out, so I’m not sure how much I’ll be able to do. I definitely want to get into some part of the Machine Learning. Additionally, learning JSON will be important for if/when I bring the full game of Magic into the model. There’s already an existing JSON card library that I could draw from and are a lot more things I can do with this in the future. It’s been a great experience so far and am looking forward to these next few weeks.

Leave a Reply

Trending

Discover more from NikCreate

Subscribe now to keep reading and get access to the full archive.

Continue reading