MoreGamesNow wrote:
I'm a little concerned that this game might be simple enough that almost every game would end in a tie.
Nope! It has been proved that all completed games must end in a win.
Offline
What would be really cool is if you played Strategery
Offline
roijac wrote:
come back to me when you wrote one...
Okay, sounds fun!
Offline
Hey, hey, hey, my challenge first, alright?
Midecah has already done a Chess engine in Scratch, if you're curious.
Offline
Hardmath123 wrote:
Hey, hey, hey, my challenge first, alright?
Midecah has already done a Chess engine in Scratch, if you're curious.
Weeelll...
I saw that, I think. It was very slow, iirc; but rather impressive.
...see, Chess would be easy!
Offline
Let's see... 10x10 grid gives 100 possible first moves, right? Followed by 99 for player 2, 98 and so on. So that gives 100! (100 factorial) possible games, right? (Less than this, though, as some would finish earlier when a player wins.) Either way, that's a rather large number.
So we can't just use a straight Game Tree, then... Need a way of evaluating the game state at any point. Hmm...
Last edited by blob8108 (2012-04-25 14:09:09)
Offline
I hate to just barge in and criticize your tournament idea, but I think it would be interesting to try a Tetris AI match. Hardmath123 could generate a long list of blocks types, and each person would then have to write an AI (without knowing the order of blocks beforehand) to play the game autonomously. As long as each AI plays against the same sequence of blocks, there is no advantage, and the winner is the one who lasts the longest. Just chipping in my opinion here.
Offline
amcerbu wrote:
I hate to just barge in and criticize your tournament idea, but I think it would be interesting to try a Tetris AI match. Hardmath123 could generate a long list of blocks types, and each person would then have to write an AI (without knowing the order of blocks beforehand) to play the game autonomously. As long as each AI plays against the same sequence of blocks, there is no advantage, and the winner is the one who lasts the longest. Just chipping in my opinion here.
I'm not sure a game-tree would be necessary to play this effectively (is the point of this to utilize a game-tree-based AI?)
Offline
roijac wrote:
no, it's not complex at all...
just think about a good algorithm to find all available next moves, that includes:
pinned pieces
check
castling
promotion
en passant (we could leave this out)
come back to me when you wrote one...
Castling and promotion aren't easy, but they're do-able.
Checks are more difficult, since they, in effect, require the user to think two ply deep. One solution is to have a "can this square be attacked" function (I might actually have already written such a function on my other computer, but I'm in New Mexico right now and can't check). Alternatively, if the computer is searching any amount of depth, it simply won't play any move that ends in its king being taken; you can basically ignore them.
I might also have a movement function done (no promises though).
I would recommend forcing the teams to write the movement functions as well though, as the efficiency of the function is important to the depth that the computer can search, and how the function returns possible moves greatly effects how the rest of the code is written (notably the "make move" and "unmake move" functions).
En passant is tricky, because it requires knowledge of prior moves.
A method of movement that I have found effective is to have an array and every two elements represents one move. The first is where the piece is coming from, the second is where the piece is going. To store whether or not a piece is taken, the second item can be incremented by 100 based on the piece (this is important for "unmaking" a move. So:
0, 4 moves the piece on square zero to square 4.
3,104 means the piece on square 3 takes the pawn on square 4.
34,423 means the piece on square 34 takes the rook on square 23.
Promotion is indicated by whether the first item is between 99 and 200.
Castling is indicated by whether the first item is between 199 and 300.
Of course, this is a rather complex system and requires a totally different "make move" and "unmake move" function than an alternative movement-generation function.
My point is, since the movement function is such an integral part of the script, each team should be forced to code it.
Offline
MoreGamesNow wrote:
amcerbu wrote:
I hate to just barge in and criticize your tournament idea, but I think it would be interesting to try a Tetris AI match. Hardmath123 could generate a long list of blocks types, and each person would then have to write an AI (without knowing the order of blocks beforehand) to play the game autonomously. As long as each AI plays against the same sequence of blocks, there is no advantage, and the winner is the one who lasts the longest. Just chipping in my opinion here.
I'm not sure a game-tree would be necessary to play this effectively (is the point of this to utilize a game-tree-based AI?)
I'm not exactly sure whether the competition is meant to focus on game-tree AI's. But you could implement something similar to a game tree: your function assumes there is an even distribution of pieces. If it adds up the previous pieces that have been sent, it can guess the likelihood that the next piece will be of a given type (or the piece after next, if the next is provided, as in a standard Tetris game). You're right that it isn't the same as being able to calculate every possible outcome, but the same is true of any multi-player game.
Last edited by amcerbu (2012-04-25 19:00:11)
Offline
Hey amcerbu,
A critical part of this idea was pitting two programs together, because:
a) You have to react to moves by an opponent rather than random ones
b) It's kinda cool
Tetris is single-player. Also, it doesn't need much of a game tree, or for that matter much strategy programming, only problem solving. So, I think we'll stick with 10x10 Hex.
For all Chess lovers, we could hold a second round with Chess if the Hex challenge works out.
Offline
Hardmath123 wrote:
For all Chess lovers, we could hold a second round with Chess if the Hex challenge works out.
It's a deal
Offline
So when is this starting?
Offline
May 1st, we're advertising and making teams until then. So you're joining? If you do, you'll be in the Red Team.
Blue Team
Roijac
bobbybee
Red Team
blob8108
(Hardmath123, if there are an odd number of players when we need to start)
Offline
Sure!
Blue Team
Roijac
bobbybee
Red Team
blob8108
rookwood101
(Hardmath123, if there are an odd number of players when we need to start)
Offline
Hardmath123 wrote:
May 1st, we're advertising and making teams until then. So you're joining? If you do, you'll be in the Red Team.
Sorry, I really can't. AP exams begin on May 7th, and I have to study for them (as well as catch up on homework after a week-long trip to New Mexico and after procrastinating on an online class). If there will be a second one I'll probably do that though.
Offline
May 1st - 31st is the end of the school year for everyone, so people will be studying for the End-of year tests and stuff. I suggest either doing it sooner, or waiting till summer vacation starts up.
Last edited by Magnie (2012-04-26 13:48:22)
Offline
Magnie wrote:
I suggest either doing to sooner, or waiting till summer vacation starts up.
I second this. Do it it over the summer!
Offline
I might join, but I'm not sure, it depends on the game. I wouldn't do chess, cause I'm not very good at the logic for it compared to people who study the game.
Offline
Magnie wrote:
May 1st - 31st is the end of the school year for everyone, so people will be studying for the End-of year tests and stuff. I suggest either doing it sooner, or waiting till summer vacation starts up.
Good point, Magnie. How about June 1 to June 15th?
Offline
Hardmath123 wrote:
Magnie wrote:
May 1st - 31st is the end of the school year for everyone, so people will be studying for the End-of year tests and stuff. I suggest either doing it sooner, or waiting till summer vacation starts up.
Good point, Magnie. How about June 1 to June 15th?
I think that would work.
Maybe the whole month of June and then judge the projects in July? (Not sure which day would be "perfect" though)
Offline
Ok. I'll ask a mod to rename this to "Rescheduled: June 1st". 'till then we can discuss the game, etc.
Offline
And make the library, with Canvas and everything!
Offline