| Author |
Message |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 1 Registered: 7-2008
| | Posted on Thursday, July 03, 2008 - 12:24 am: | |
So I made a 4 player chess variant, and when you capture an opponent's king you're supposed to not only inherit all their pieces, which I accomplished handily, but thier move as well. So, how can I change the turn order sequence in the midst of gameplay? Is there any way at all to accomplish this, short of staggering multiple variants and jumping to various versions depending on who captures what king, if even that is possible? |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 77 Registered: 1-2007
| | Posted on Thursday, July 03, 2008 - 4:58 am: | |
I have also implemented 4-handed variants, the 4-handed Shatranj http://hem.passagen.se/melki9/4shatranj.htm and the 4-handed Chaturanga http://hem.passagen.se/melki9/4chaturanga.htm Zillions plays such variants badly. Perhaps you should try to implement it in Axiom. Maybe you could set move order to double moves for each party, although the one move is not allowed as long as you haven't inherited a colour, which is signalled by an external invisible piece. Mats |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 4 Registered: 7-2008
| | Posted on Thursday, July 03, 2008 - 8:04 pm: | |
You made the 4-handed Shantranj and Chaturanga? It was your complete set change-owner code that I started with for capturing sets. I was able to trim it to about 60% of its original size though. I like your idea for multiple moves, but I need restrictions. Say White captures Black's King, I want White to now get Black's move, but during that turn in the sequence he can only move Black's remaining pieces, and on his original White turn he can only move his White pieces. Can this be accomplished in Zillions? |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 79 Registered: 1-2007
| | Posted on Friday, July 04, 2008 - 5:44 am: | |
You only need to set an attribute in each piece, which is set from the beginning. A transformed white piece could have an attribute black-piece set to true. In this case it must move first, or whatever. Mats |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 6 Registered: 7-2008
| | Posted on Sunday, July 06, 2008 - 11:33 pm: | |
Okay, I kind of got the stealing sets and stealing moves down now. I created a neutral player for each player, for each color, and assigned each player a move of their corresponding neutral player in the turn sequence in line with when that color moves. Then when someone captures an opponents king, I don't use the change-owner command but A LOT of sequencial 'flip' commands in order that their neutral player of that color assumes command of all the pieces. Then their turn with the neutral players pieces starts to mean something and they control the captured set, during its original turn, thus assuming multiple moves per round of play. Now, there has to be a more efficient way to tell Zillions to change ownership to a specific player instead of the current player. Any ideas? |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 80 Registered: 1-2007
| | Posted on Wednesday, July 09, 2008 - 4:58 am: | |
I don't know, but I don't understand why you must implement such comlicated rules. A game is better the simpler the rules. In my 4-handed Shatranj I change owner of pieces when the king is captured, and the pieces simply change colour. It's a simple rule and it works fine. Mats |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 9 Registered: 7-2008
| | Posted on Saturday, July 12, 2008 - 5:05 pm: | |
What's so difficult to understand? If a player captures another player's pieces he is supposed to be rewarded with the additional pieces as well as their move. I'm not going to dumb down the game just to make the programming easier. I mean, what kind of comment is that? I'm sure I could make the programming easier by not having a four player variant too. Maybe I could make a game that as soon as you open the file it says that you win. I'm sure that would be some simple programming. Producing an inferior game just because one doesn't want to program complex code just shows how lazy and uncommitted one is to producing a quality game. What a waste of time to strive to create a subpar game. |
Keith Carter (Keithc)
New member Username: Keithc
Post Number: 155 Registered: 8-2000
| | Posted on Saturday, July 12, 2008 - 8:54 pm: | |
I disagree with Matts bare claim that the simpler the rules the better the game. The change of pieces to a player plus picking up a move in the turn order creates a significantly different dynamic. It would make for a significantly different game. It is not inheriently superior or inferior. Shane, Mats is one of the most gifted zrf scripters still active on the board. He can be a great resource. He does have a tendency to state what he would do in the same situation as an absolute truth. Don't take it as a personal offense. If his advice is not helpful just ignore it. Mats, your one of the strongest zrf scripters. Are you saying it is difficult but doable? How would it be done |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 60 Registered: 1-2007
| | Posted on Saturday, July 12, 2008 - 11:44 pm: | |
On the one hand, I think one should resist compromising the vision of their game due to the complexity of the programming. On the other hand, there are limitations to what is possible via ZRF and Zillions AI. So there are cases where if one wants a viable game, some compromise is necessary. This topic has been discussed before in this forum. I'll end with the following story. Did you ever wonder why stealth aircraft has a faceted design? It's because the software, called "Echo 1", that is used to calculate the radar cross section of an aircraft used a mathematical technique that required flat surfaces. Hence, the design of the physical aircraft was dictated by the limitations of the software algorithm. -- Greg |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 10 Registered: 7-2008
| | Posted on Saturday, July 12, 2008 - 11:58 pm: | |
Keith: It's quite doable. I'm doing it, and it works just fine. I was just looking for a more efficient method. The flip command sucks as opposed to having a change-owner <player> command which would have made my life exponentially easier. But I made it work for me, and now capturing a King results in ownership of the entire set shifting and only being able to move that set during their original slot in the turn sequence. Taking it one step further, using the captured set to capture yet another set still results in the owner receiving the next set and its turn during the sequence. So all that has been resolved. Now I'm moving on to smaller problems. Maybe someone can give me a viable solution to one or both of the following: 1) It says that I have an endless loop in the move logic of a piece when I load. Help? What is it? How can I track it down? 2) My win-condition occurs when 3 Kings have been captured. To do this I removed the checkmate command from the win-condition, but this removed the demand that you protect your King at all costs. Is there some way to have the game enforce protection of your King without having the win-condition dependent on checkmate? |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 81 Registered: 1-2007
| | Posted on Monday, July 14, 2008 - 6:03 am: | |
I have not used insulting language. I maintain that it is a bad rule. If a player takes over another player's pieces, why is it then necessary that he takes over his move right, too? To take over the pieces, in itself, is an enormous advantage. There is no reason to make it worse. To allow capture of kings, yet have a demand that they must avoid checkmate, is self-contradictory. You have a problem with a loop. Probably you do $1 without an add, or loop without $1. I maintain that you should try to implement this in Axiom instead. Then I would be interested in the result. Multiple-player chess variants function badly in Zillions. Zillions somehow loses his bearings. Mats |
Keith Carter (Keithc)
New member Username: Keithc
Post Number: 156 Registered: 8-2000
| | Posted on Monday, July 14, 2008 - 3:24 pm: | |
What about using loss-condition? (game ... (loss-condition (White Black) ; if either Black or White lose their King, they lose the game (captured King) ) ... ) Or will the multiplayer aspect preclude use of a loss condition? |
Keith Carter (Keithc)
New member Username: Keithc
Post Number: 157 Registered: 8-2000
| | Posted on Monday, July 14, 2008 - 5:53 pm: | |
Zillions will not play multiplayer well because when doing move generation it treats all enemy pieces as being on the same team (and having one move) so it does not consider, for example, a case where a piece from team B moves out of the way so team C can make a capture. I second the Axiom suggestion. Axion handles more than one player well. See Festival Climbers. |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 11 Registered: 7-2008
| | Posted on Monday, July 14, 2008 - 9:39 pm: | |
Mats - You maintain that it is a bad rule. Why? You've never played the variant. When 1 player seizes control of 2 sets, the remaining 2 players with only 1 set tend to follow the enemy of my enemy is my friend train of thought and try to beat down the stronger opponent in tandem. Without the extra move, it would mean that capturing an additional set places you at a disadvantage because your opponents have 2 moves to attack you and you only have one to defend/retaliate. Acquiring the extra move maintains a balance in the game and gives true incentive for capturing an opponents king. I never actually located the specific line of code that was creating the endless loop, but I resolved it by process of elimination (cutting out huge chunks of code until it disappeared and then reimplementing fresh code to replace the endless segment). To allow capture of kings and demand that they avoid checkmate is not contradictory. How is it? If I'm trying to put an opponents king in checkmate, I want him to have to do everything in his power to get out of it. Once he has been checkmated, he is no longer obligated to get out of check because he cannot, and then when I capture his king I assume control of his pieces and move. As for the suggestion to implement the game in Axiom, I will be getting to that once I have forced Zillions to implement everything I want it to do. And I do agree that Zillions plays multiplayer chess variants badly. My intentions for this game were not for human vs computer play but 4 human players on a network/internet. I rarely let the computer attempt my variant, and when I do it is not for a challenging game but looking for glitches. Keith - You are correct when you say that the multiplayer aspect plecludes use of a loss-condition. Currently, when a king is captured a token is placed in a 3 square reserve. When the 3 squares are filled, the win-condition is satisfied and the player whose turn it is is declared the winner. Again with Zillions sucking at multiplayer, I don't think my variant even gets to the point you made. In the 5 seconds per move that I currently allot for their thinking, they don't even get past calculating the best moves for the first couple of their pieces. Again, not currently designing for human vs computer type play. Given that I have just about squeezed everything out of Zillions that I can at this point, I will be moving on the Axiom shortly I imagine. At this point, other then the game not enforcing the protection of the king which I don't believe I can accomplish and keep the integrity of the current rules, all I have left to implement is 4-player En-Passant capture. And that'll probably be done by the weekend. Shane |
Keith Carter (Keithc)
New member Username: Keithc
Post Number: 158 Registered: 8-2000
| | Posted on Tuesday, July 15, 2008 - 12:55 am: | |
Shane - if you right click on the king what is it worth? With its low mobility I am guessing not much. One way to have the king treated more like a piece that must be preserved is to raise its value. Using move priorities give it a move that it never uses. Put a bunch of bare "add"s in there till it is worth three times what a queen is. |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 12 Registered: 7-2008
| | Posted on Wednesday, July 16, 2008 - 12:24 am: | |
Keith - I like the basis of that idea. My Kings are currently worth barely more than my Knights, 23,000 vs 21,000. While the Queen is valued at 90,000+. This antificial inflation of value peaks my interest, not only for the King but for the two Princes in the game as well. I haven't made use of move priorities as of yet. Unfortunately, this will only mask the true nature of the problem that I'm having though, so very soon I'm going to have to give up on Zillions and try to hit it off with Axiom. Since I fixed En-Passant this morning in like 10 minutes, there's nothing left in my queue of things to do that can be accomplished currently with Zillions. Shane |
Keith Carter (Keithc)
New member Username: Keithc
Post Number: 159 Registered: 8-2000
| | Posted on Wednesday, July 16, 2008 - 2:47 am: | |
There might be another way to do it without move priorities. I have not this. Give the king the same basic King move 4 or 5 times. |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 13 Registered: 7-2008
| | Posted on Thursday, July 17, 2008 - 12:01 am: | |
Keith - I added a move that is only possible if an impossible scenario occurs, put dozens of adds in the sequence then added the move to the Kings. The value of the Kings is now more then double that of the Queens, but the computer still doesn't care so much about their Kings. I've reached the limit of integrity that Zillions will allow me to accomplish with my game. It's too bad that I got so close and can't finalize it. Shane |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 82 Registered: 1-2007
| | Posted on Thursday, July 17, 2008 - 5:08 am: | |
Shane, to allow two moves in a row is awkward and not compatible with the nature of chess. The advantage it creates is stupendous. One should not simply repeat moves when increasing piece value. This is too costly. Instead its better to create a low priority move and add moves to an occupied external square, like I always do in my chess variants. By the way, it is much better to begin with a simpler program. In a year or so, this program won't pose that great problems to you. |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 14 Registered: 7-2008
| | Posted on Thursday, July 17, 2008 - 9:47 pm: | |
Mats - It's not necessarily 2 moves in a row for starters. If you capture the opponent opposite to you then you control every other move. And again, you can only move the piece colour associated with that move in the sequence. I will agree that the advantage it creates is large. That's the idea. You're being rewarded for checkmating and capturing an opponent's king in the midst of battling 3 opponents simultaneously. BUT, the advantage can be stripped away if the remaining 2 opponents pool their resources against the stronger opponent. Then there is equilibrium. I don't understand why you think that the extra move is responsible for lopsiding the favour of the game outcome so drastically. This isn't just some chess variant I dreamed up and decided to program. I've been playing the variant vs my friends in College for 2 years and for several years in High School before that, and by no means does someone acquiring 2 sets/moves decide the outcome of the game. Many a time someone will seize 2 sets and the other 2 players form an unspoken temporary truce until the balance of power is neutral once again. On one occasion I outmatched someone who controlled 3 sets to my 1. So if you can't handle the idea of the challenges the game produces, that's fine. But in no way does that mean that your perspective has any merit. Point 2 - I didn't add value to my Kings by repeating the same moves. I added a move that checks to see if a certain offboard square is occupied, which it never is, and if it is then all the adds I put in sequencially would be executed. Point 3 - I started with the idea of the game and programmed the rules in order of simplest to hardest. That was the idea anyway. There were dozens of variations in between what I started with and what I have now, and all worked within the bounds of their rules. I didn't come on here and start posting questions until the latter stages of 'development'. Side note to that, in a year, unless Zillions drastically improves their low level user control, I don't suspect that I'll be doing anything with this program. I'd ask if you wanted a copy of my current project, but given your distain for many of the rules I have implemented, I can only imagine what you'd have to say about how I whipped the program into shape. Shane |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 61 Registered: 1-2007
| | Posted on Friday, July 18, 2008 - 3:22 am: | |
Shane wrote: [Side note to that, in a year, unless Zillions drastically improves their low level user control, I don't suspect that I'll be doing anything with this program.] I think you'll have a better chance at winning the Lotto than expecting any further releases of Zillions. Unfortunately, the product has been retired and the creators no longer respond to email. -- Greg |
Keith Carter (Keithc)
New member Username: Keithc
Post Number: 160 Registered: 8-2000
| | Posted on Friday, July 18, 2008 - 12:41 pm: | |
There is not development of the zrf scripting language going on and has not been since May of 2005 (?). Axiom is very actively in development. |
Keith Carter (Keithc)
New member Username: Keithc
Post Number: 161 Registered: 8-2000
| | Posted on Friday, July 18, 2008 - 12:42 pm: | |
Whoops, typo. That should be there is "no" development. |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 83 Registered: 1-2007
| | Posted on Friday, July 18, 2008 - 5:28 pm: | |
Shane, it is not disdain. The pros and cons of chess variants are always discussed at http://www.chessvariants.org .They vote for the best variants each year and they take part in the yearly email tournament. I am a chess variant enthusiast and have had two variants published in Variant Chess magazine. I've created email interfaces for many of my own variants. I don't know if it's possible for a multi-player variant. Mats |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 15 Registered: 7-2008
| | Posted on Monday, July 21, 2008 - 12:02 am: | |
So in a feeble attempt to begin instituting rules that would demand that a player protect their King I added a simple (verify not-attacked?) command to the King move syntax to ensure that the Kings not purposefully move into check. This 2 word addition has dramatically incleased game loading time (which is already significant to begin with) and AI move time (from previously maybe 20 seconds to now in excess of a minute and a half) This is obviously an unacceptable side effect. Can someone offer an explanation and maybe a solution? (Don't tell me to remove the code as a solution. Obviously that would revert the times to their previous state.) -- Shane |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 62 Registered: 1-2007
| | Posted on Monday, July 21, 2008 - 3:30 am: | |
[Can someone offer an explanation] I don't believe there is mention of the side effect that you describe in the Zillions help file, so all one can do is speculate. My guess is that at game loading time, if the "attacked" or "checkmated" keywords are present in your zrf file, Zillions adds additional overhead to the search in order to dynamically maintain this information thus leading to the slowdown. That's just a guess and I know it doesn't help much. -- Greg |
Keith Carter (Keithc)
New member Username: Keithc
Post Number: 162 Registered: 8-2000
| | Posted on Monday, July 21, 2008 - 4:43 am: | |
I don't have a solution. Based on the text of attacked? I would think it adds a lot of overhead. "Zillions determines whether a square is attacked by generating moves for the opponent to see if the opponent could take the piece on the position. If the position is currently vacant or occupied by another side’s piece, Zillions will temporarily place a friendly piece there." I don't understand the 20 seconds to in excess of a minute and a half you are seeing. What are your settings for the AI turns? |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 16 Registered: 7-2008
| | Posted on Monday, July 21, 2008 - 8:38 pm: | |
Regardless of the settings I have determined for the AI turns it takes a significant amount of time in between moves. I discussed this with Greg. In short, I believe it is due to the fact that I have assigned dummy players to run designated syntax's following every player turn. But, there isn't a noticeable pause between turns if I play the game as all 4 players, so perhaps this assumption is merely speculation. I'll continue to ask new questions though. I am unable to play my game with myself (two computers) on my network. I thought at first that perhaps there was some firewall problem, but then decided to try a network game with the regular chess that came with the program and it works fine. I briefly scanned the chess zrf and don't see anything that needs to be added in order to accommodate network play. Do I need to include something specific in my zrf to allow network play of the game? Or am I experiencing some other problem? -- Shane |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 63 Registered: 1-2007
| | Posted on Monday, July 21, 2008 - 9:37 pm: | |
You shouldn't have to do anything special for net play to work although I've never tried it with anything other than 2 player games (note: logically your game is 2 player, but physically represented as 4 player and thus so to Zillions). Maybe you could try playing tic-tac-toe over your network just to see if Zillions net play works at all with your systems. If that works, then I suggest trying at least one existing multi-player game to see if that works too. Once again, I'm just guessing, but that's how I would approach it. -- Greg |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 17 Registered: 7-2008
| | Posted on Tuesday, July 22, 2008 - 8:13 pm: | |
Greg - You must have missed the portion of my post where I stated that I did engage a 2 player chess game over my network just fine. Given that my intentions for this game were to create it solely for the purpose of 4 player network/internet play, and perhaps dabble with the AI players as a side note, if I can't depend on ZoG to function as the medium for the 4 player environment, I guess I'm done with the whole thing. Greg, sorry that I wasted your time with the Axiom conversion. I have no doubt that I could have made the AI players better, and instituted my own checkmate function, but without the 4 player network/internet capabilities, all of my effort has been moot. -- Shane |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 64 Registered: 1-2007
| | Posted on Tuesday, July 22, 2008 - 8:26 pm: | |
Shane, Have you tried the Axiom 4 player version via internet play? If not, I think that would be worth a try just in case there was something else about your zrf that created problems for Zillions that was absent in the Axiom version (e.g. the dummy players). As usual, just guessing here. -- Greg P.S. BTW, even if it doesn't pan out, I don't consider the conversion a waste as I found and fixed a bug in the symmetry case where the sides are not directly opposing (never tried that before!). |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 65 Registered: 1-2007
| | Posted on Tuesday, July 22, 2008 - 9:42 pm: | |
OK, I just tried some Net-play experiments. I couldn't get the Axiom version of Prince Chess or Mats 4-handed Chaturanga to work. I can create a session and have the other oppnent joint, but the problem is that the "Challenge" button isn't active - is that what you're seeing? As you did, I was able to verify other two player games worked beforehand so it seems the problem occurs for any multi-player game. I tried selecting various player combinations to no avail. I know you already know all this, but I wanted to confirm that we both get the same results. Unfortunately we do. -- Greg |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 18 Registered: 7-2008
| | Posted on Tuesday, July 22, 2008 - 11:58 pm: | |
Greg - I even opened 4 copies of Zillions (2 per computer) and had all 4 joined in one session to see if it wanted the amount of players in the game present for it to be 'challengeable', but to no avail. I guess at some point in the future, since I don't have time at present due to University, I'll have to program the game from the bottom up with C++ or something and then figure out all the networking/internet crap on my own and integrate it all into an exe. It sucks, because with Zillions I was able to get so close to achieving my goal. -- Shane |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 19 Registered: 7-2008
| | Posted on Wednesday, July 23, 2008 - 1:37 am: | |
So does anyone know of any other programs like ZoG out there that I could try to develop my game using? -- Shane |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 66 Registered: 1-2007
| | Posted on Wednesday, July 23, 2008 - 2:06 am: | |
Shane, First off, I'm sorry that your initial experience with Zillions turned out to be unfulfilling. I hope you don't give up on it completely as I think you have great potential as a "Z" developer. Also, if it matters, I did read the rules of your game several times over and concluded that it would be doable in Axiom. At the very least, I'll file it away for the future just in case I ever end up with an online play capability for Axiom. One thought that might be worth looking into is some of the Chess front end programs such as WinBoard and XBoard although I don't know if they can accomodate your board or not. The advantage would be that you wouldn't have to code the GUI or the networking portions of the game, "just" the game mechanics and AI. Sorry it didn't work out this time and please keep us posted on any future developments. -- Greg |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 67 Registered: 1-2007
| | Posted on Wednesday, July 23, 2008 - 2:18 am: | |
[So does anyone know of any other programs like ZoG out there that I could try to develop my game using?] http://gtkboard.sourceforge.net/indexold.html http://sourceforge.net/projects/g2f3/ Having never tried either one, I can't vouch for them. -- Greg |
Ken Franklin (Kenz)
New member Username: Kenz
Post Number: 48 Registered: 3-2001
| | Posted on Thursday, July 24, 2008 - 4:50 am: | |
Going back to the start of this thread, what about using a (pass-turn forced) along with a turn order of: e.g. White +(White opponentking(s)-changes moves) (Black newBlk-exwhitepiece moves) (Red newRed-exwhitepiece moves) (Green newGrn-exwhitepiece moves) Black +(Black opponentking(s)-changes moves) (White newWh-exblackpiece moves) (Red newRed-exblackpiece moves) (Green newGrn-exblackpiece moves) etc. +Perhaps all the possible Captured King Dependant changes could exist in a separate turn-order, e.g. White (opponent king(s)-changes moves) based on an IF condition after the initial normal turn. Instead of flipping neutral pieces: After capturing a King, maybe use a set of separate change-owner and a change-type (to newGrn-exblackpiece) style move(s). This also means including matching duplicated new-piece defines with ex-name move-types. So, for example Pawn-regular and Pawn-exRed (to be owned by either White, Black or Green) ==moves (move-type newWhite-exRedpiece) ==moves (move-type newBlack-exRedpiece) ==moves (move-type newGreen-exRedpiece) plus Pawn-exBlack, Pawn-exWhite, & Pawn-exGreen piece defines. *Shorter actual movenames might workout better. |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 68 Registered: 1-2007
| | Posted on Thursday, July 24, 2008 - 5:00 am: | |
I think its doable. Zillions gives you a fixed turn order so one has to resort to tricks to make it more dynamic. My though was to use the following two tricks in order to do that: 1) To gain an extra turn for a player, generate a partial move. 2) To remove a turn for a player, generate a pass move. -- Greg |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 84 Registered: 1-2007
| | Posted on Friday, July 25, 2008 - 4:09 pm: | |
On the other hand, Zillions is much better suited for simpler projects. It has played a big role in historical game research. I have contributed, too, like in my Bear games from the roman era. The other day an Italian gentleman thanked me for my implementation of Italian Damone which he played in his youth, 40 years ago. In this way this forgotten game is saved for the future. It is a good example. It's rules are quite complicated, but it doesn't take much code to implement in Zillions, although you must know some tricks. And it plays the game very well. Zillions is in most cases a remarkable tool. /Mats |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 20 Registered: 7-2008
| | Posted on Friday, July 25, 2008 - 8:24 pm: | |
Ken - I do use pass-turn forced for starters. Otherwise as soon as a set gets captured and the defeated player's turn comes a stalemate is issued because that player has no pieces to move, thus no valid move. The problem with your idea for my own purposes, is that changing the owner of the piece, and the piece type inside the same move construct is too lengthy, and Zillions won't allow it. (partly because I also have code inside each move construct dedicated to moving captured pieces to a display case in front of the player who made the capture) I do see how I could implement your idea for assigning the additional moves by integrating it with my current config, but I don't see the advantage to eliminating 12 Dummy players in exchange for 4 times my current amount of defined pieces. - Shane |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 21 Registered: 7-2008
| | Posted on Friday, July 25, 2008 - 8:32 pm: | |
Mats - The only truly bad thing about Zillions is that it is no longer in development/being supported. If the people who made it are no longer interested, they should release it as open source so that somebody else can pick up where they left off. No matter how good a program is, there is always room for improvement. The fact that development of Zillions has stagnated baffles my mind. I don't understand how anyone who has made something as great as this could willfully allow it to roll over and die. - Shane |
Greg Schmidt (Gschmidt2)
New member Username: Gschmidt2
Post Number: 69 Registered: 1-2007
| | Posted on Friday, July 25, 2008 - 10:14 pm: | |
Shane, I'm in complete agreement with all your points about the state of the Zillions product (and I suspect most others in this group are as well). Last year, I released a patch to Zillions.exe which fixes a bug having to do with external engines. I managed to indirectly get word back from the designers that they weren't thrilled about it, but given that there will be no more releases/patches it was tolerated. I even offered to support Zillions for free in whatever "spare time" I had left, but that request went unanswered. I had a similiar dream of it being released as open source too, but I think that will have to remain as little more than a nice thought. In some sense, I am trying to indirectly keep the Zillions product going through my efforts with Axiom. Lately, I've been working on a zrf parser to be used both in a zrf conversion tool and an Axiom game client. -- Greg P.S. I am now able to convert a zrf file to both .xml and .4th (the latter for use by Axiom of course). The advantage of XML is that, in that form, one does not have to write a parser to read the data from the zrf file. One could also use standard off the shelf XML tools to manipulate it (e.g. you can even browse the file with your internet browser). Anyone can email me at gschmidt958@yahoo.com if they're interested in obtaining the tool. -- Greg |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 85 Registered: 1-2007
| | Posted on Saturday, July 26, 2008 - 4:49 am: | |
Shane, to avoid stalemate one could introduce a low-priority move which involves pressing a button to acknowledge a pass move (the button press is the only move left to do). This is a way of passing turn to the other player. If I remember correctly I use this method in Bario (which is a horrid piece of software that really needs to be rewritten). In this chess variant a pass turn is acknowledged by pressing a red button. I don't know if this makes any semse to your variant. A zrf parser sounds like a great tool. Considering the many mobile devices which people use for game playing on the subway, etc., if Zillions could compile to the cellular phones and pda:s, that would be fantastic. But it's only a fantasy, of course. For some strange reason they've decided that this product is not going to survibe into the future. There is no garantee that it will run perfectly on future Windows versions. /Mats |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 22 Registered: 7-2008
| | Posted on Saturday, August 02, 2008 - 11:46 pm: | |
Ken - Your idea got me thinking about how I could streamline my code, so thank you for the comment. I just rewrote today. I gave all pieces 4 different move types, 1 set of moves for each color/player on the board. Then I gave each player a turn for each move-type they could possess. By doing this I was able to eliminate 13 of 16 Dummy players in the game, I reduced the number of defined pieces I had, and shrunk my code size from 570K to just under 300K. All of this without compromising any aspect of my game. It also allowed me to remove my custom <friend?> syntax, as before every player had 3 Dummy player friends, since now each player actually owns all of the pieces they control. So now that I've removed all of that overhead, maybe I can implement my own checkmate syntax without bogging down the game like it was before. - Shane |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 88 Registered: 1-2007
| | Posted on Sunday, August 03, 2008 - 5:46 am: | |
Sounds interesting. But how can the move-order be retained then? If a player has lost a piece-type, does he lose a move? Please report if Zillions starts playing reasonably well, then I will have to rewrite my own 4-player variants (sigh!). By the way, I have never tried the feature that one can make a move with another player's pieces: (turn-order <player> <player> <move-type>) First player makes this type of move with second player’s pieces. In that case one needn't change owner. Maybe it could be useful in this context, I don't know. Moreover, if you can't get the net-play to work in Zillions, and you want to play this game over the Internet, why don't you implement an e-mail interface instead, without rules checking. When playing against humans there is no need for rules checking. When one moves a piece on the board an e-mail is sent. That's all, and that's how the e-mail interfaces on the chessvariants page works, although it's possible to implement rules checking if one prefers it. /Mats |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 23 Registered: 7-2008
| | Posted on Sunday, August 03, 2008 - 1:40 pm: | |
Mats - I'll try to explain the concept of what I did better. I'll use a single piece type to illustrate. The four players in my game are N, E, S, W. I have 4 rooks defined in my game: N_ROOK, E_ROOK, S_ROOK, and W_ROOK. The N_ROOK has 4 move types, N_N, E_N, S_N, W_N. The E_ROOK has 4 move types, N_E, E_E, S_E, W_E. The S_ROOK has 4 move types, N_S, E_S, S_S, W_S. The W_ROOK has 4 move types, N_W, E_W, S_W, W_W. Now each move type has a set of moves. N_N, N_E, N_S and N_W are THE SAME MOVES, which belong to N. E_N, E_E, E_S and E_W are THE SAME MOVES, which belong to E. S_N, S_E, S_S and S_W are THE SAME MOVES, which belong to S. W_N, W_E, W_S and W_W are THE SAME MOVES, which belong to W. At the start of the game: N player gets N_ROOK, E player gets E_ROOK, S player gets S_ROOK, W player gets W_ROOK. The turn order is defined as: (N N_N) (E E_N) (S S_N) (W W_N) (E E_E) (N N_E) (S S_E) (W W_E) (S S_S) (N N_S) (E E_S) (W W_S) (W W_W) (N N_W) (E E_W) (S S_W) All of these turns are of the form (player move-type) There are no open moves in the game. A player is always restricted to moving pieces that they own with those specific move-types during that slot in the sequence. So at the beginning of the game, each player will have 4 moves, but 3 of them will be forced to pass because the player does not own any pieces with the specified move-types. So the TRUE start game turn sequence would be: (N N_N) N player moves an N_(piece) (E E_E) E player moves an E_(piece) (S S_S) S player moves an S_(piece) (W W_W) W player moves a W_(piece) Now let's say N captures the E_KING. A syntax is called that scans the board for all E_(pieces) and when one is found, change-owner is invoked. So, the E_ROOK (and all other E_(pieces)) belong to N. Now the TRUE turn sequence changes to: (N N_N) N player moves an N_(piece) (N N_E) N player moves an E_(piece) (S S_S) S player moves an S_(piece) (W W_W) W player moves a W_(piece) So hopefully that explains better how I'm doing what I'm doing, and should answer the first 2 questions you posted. As for Zillions playing ability, I have noticed a significant improvement in game play, but I don't want to speculate that it is the choice of code rather than the fact that I halved the overall code size. - Shane |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 89 Registered: 1-2007
| | Posted on Sunday, August 03, 2008 - 4:45 pm: | |
Thank you. It is interesting. Be sure to comment your code properly. You should know that Zillions plays two-player chess variants finely, at least if you introduce some tweaking. This might not be necessary in your variant, but I always encourage centre pawn moves, and discourage early queen moves. I also discourage moving the king to a corner square, which is often a fatal tempo loss. With these tweakings Zillions plays a good game of chess, sometimes attacking with the pawns on the wings, etc. /Mats |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 24 Registered: 7-2008
| | Posted on Wednesday, August 06, 2008 - 12:53 am: | |
Okay, so I've decided to try to implement my own syntax to force players to protect their Kings from capture. My idea is, using a dummy player right before each players turn: 1) scan the board for the upcoming player's King 2) once the King is found, use a variation of the attacked? command to determine whether it is being threatened 3) if it is being threatened, scan the horizontal and diagonal lines for the attacking piece or pieces plus the 8 squares that could be occupied by Knight moving pieces 4) when the attacking piece is located, mark the square it is occupying plus every square between it and the King that would sever the line of attack if a friendly piece were to occupy it. Then, during the player's turn, move priorities would be used to only allow pieces of that player to move to squares that will eliminate the threat on their King. (The moves from that move priority will only be accessible if an off-board piece attribute has been set true to indicate that the King is being threatened.) The problem I have here is that there are no global position flags that will carry over from turn to turn, and I really, REALLY don't want to set up a mirror dummy board just for this purpose. Does someone have a better idea? - Shane |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 90 Registered: 1-2007
| | Posted on Wednesday, August 06, 2008 - 12:36 pm: | |
If you have a mirror dummy board, then you can have a link 'z' from each square to corresponding square on the dummy board. If you want to check whether a square is marked, you only need to check (empty? z). It's simple and practical. But this scanning procedure is very costly. Isn't there a better method involving absolute pieces located beside the board instead? Losing the king sometimes involves simultaneous capture of the external absolute piece. I use this method somewhere, but I don't know if it's workable here.. /Mats |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 91 Registered: 1-2007
| | Posted on Wednesday, August 06, 2008 - 2:21 pm: | |
Of course, it's better to use "change-type"rather than capturing and creating the dummy piece. Then one can check e.g. (piece? X z). So this is virtually the same as defining global variables. /Mats |
Shane Freeman (Thegreathabudabi)
New member Username: Thegreathabudabi
Post Number: 25 Registered: 7-2008
| | Posted on Wednesday, August 06, 2008 - 8:21 pm: | |
Mats - I'm not dealing with the loss of the King with this construct. This construct is "simply" my own checkmate syntax since I had to remove the checkmate condition from my win-condition because of the 4 player aspect. What I'm trying to accomplish is to make squares that are actively being attacked off limits to the King, and if a player's King is being attacked, all moves that won't eliminate the immediate threat unplayable. - Shane |
Tony Britton (Captain)
New member Username: Captain
Post Number: 1 Registered: 12-2009
| | Posted on Monday, December 28, 2009 - 10:05 am: | |
hi Shane, did you ever get your checkmate syntax for four player games figured out. i am trying to do the same to create a checkmate forced pass scenario. please advise on your progress. Thanks Tony |
Tony Britton (Captain)
New member Username: Captain
Post Number: 4 Registered: 12-2009
| | Posted on Saturday, January 22, 2011 - 11:35 pm: | |
Has anyone found a way to fix the flaw in the change owner command with out using flags. as it stands if player1 captures player4's king and gets there pieces then if player2 captures player 1's king. The change owner command will only change player1's original pieces not the ones he gained when he captured player4's king. If you flag the pieces this will fix it but then you can only have a limited amount of pieces per player. has anyone solved this problem by using a combination of change owner and change type or create and change owner. if so please post an example. |
Tony Britton (Captain)
New member Username: Captain
Post Number: 5 Registered: 12-2009
| | Posted on Wednesday, April 17, 2019 - 9:45 pm: | |
Has anyone tried using the Leela version of Alpha Zero by inserting it into the external engine section of their existing zillions coded games? |
Tony Britton (Captain)
New member Username: Captain
Post Number: 7 Registered: 12-2009
| | Posted on Friday, January 31, 2020 - 5:35 am: | |
Has anyone ever been able to combine such as: (loss-condition (White)(and (checkmated WhiteKing) (absolute-config king (m4)) )) and get it work?? |
M Winther (Kalroten)
New member Username: Kalroten
Post Number: 175 Registered: 1-2007
| | Posted on Friday, January 31, 2020 - 3:51 pm: | |
Tony, you only need to put that into two separate loss-condition statements. |
Tony Britton (Captain)
New member Username: Captain
Post Number: 8 Registered: 12-2009
| | Posted on Sunday, February 02, 2020 - 3:47 am: | |
Unfortunately that does not work either, Matt. If they are in two separate statements then then the game ends before all the players are captured and if you don't use the checkmated command in the loss condition the engine does not utilize the condition for proper play |
Tony Britton (Captain)
New member Username: Captain
Post Number: 9 Registered: 12-2009
| | Posted on Sunday, February 02, 2020 - 3:55 am: | |
Has anyone out there though of writing an adapter code to enable Zillions to utilize the Alpha AI engine? |
david bennett (Dpoly)
New member Username: Dpoly
Post Number: 23 Registered: 4-2017
| | Posted on Sunday, February 02, 2020 - 4:53 am: | |
Many things might be possible, but I think the code needs to be open-sourced first. |