![]() |
.. (לתיקייה המכילה) | |
We wish to convert a "normal" representation of a shape variation and create a shape variation from it. How may this be done?
|
To take a shapeVariation normal vector and create a shapeVariation: You may use the logic found in the two methods of the Shape class named __makeBinaryShape and __makeBinaryShapeCorners. These methods could have been defined as global and not assosiated with the class as they dont use the "self" parameter. You may call it with any object of this class or copy the logic to a function in your code. __makeBinaryShape gives you a translantion: normal --> binary __makeBinaryShapeCorners produces the "corners" parameter required for the BlokusGameShapeVariation.__init__( , , , ) using these two you can construct any BlokusGameShapeVariation. |
What exactly due you want to see in question 10? The algorithm requested is very similar to the one learned in class.
|
There are several ways of dealing with this question and as no specific one has been defined in the question, so you are free to choose the way which makes most sense to you. We require that there be some reference to the 4 different colors in your pseodo-code. One possible way is to have the Turn(State) function return one of 4 colors and have another function GetPlayer(Color) matching a color to the owning player. Another requirement of the question is to have the algorithm return the desired move and not just the Alpha-Beta (Minimax) value. For this, one legitimate possibility is to have the Succ() function return a list of <action , nextState>. |
May we use external python modules in our player or experiments?
|
In your tournament player you may add to your submission any open source python files you find useful for your player. Please add the reference in your report and code comments and explain it's purpose. For the experiments, you can use any software you wish for producing graphs, tables, calculating statistics or whatever. |
In experiment 2, our "improved" algorithm makes the same moves as the "un-improved" one but just in less time. How should we assess the requirement of showing a specific state where the algorithm differs?
|
This issue has come up by several students. We have decided to dismiss this requirement and the HW2 spec document has been changed accordingly. You may choose to answer this question to get a maximal 10 pnt bonus for the assignment. You may, for this matter, present a hypothetical state constructed manually and discuss your improvement based on it. For example, Why will your algorithm perform more prunes? |
What kind of graphs may we choose to present in our experiments?
|
There is a large number of options you may choose. Here are a few, just from the top of my head: You can present a pie chart of point distributions win/tie/loss according to player or according to first/second player. You can show the change in branching factor over the game. You can present the final point difference in the games somehow. You can show how the time is partitioned between moves. You can show the depth reached by the player(s) and/or compare the times required for each. You can show the percentage of states selected for selective deepening over the game. You can show the ammount of prunes performed and compare it to the best and worst case. |
What is the meaning of the ORDERED_SHAPES_MODE value in BlokusGameConstants.py?
| Ordered mode means that the colors must set their pieces in a specific order decided upon at runtime at the beginning of the game. This results in a significantly smaller branching factor. It is used in game option 2 with the larger board. |
In the code supplied, the RunExperiment2.py file contains some comments regarding files shape.txt, which have not been referenced in the HW2 spec...
| You are correct. This file is a remainder of irelevant versions and has been removed to avoid further confussion. |
Must we submit an agent for the tournament? Can we use an agent written for the experiments?
|
Yes, submiting an agent for the tournament is in fact mandatory. The grade for HW2 will not be effected by your performance in the tournament as long as your agent does not consistently fail to run or throws exceptions. and yes, you can use any agent writen for the experiments, just make sure it runs in the 3 game options. |
Do we need to check the timelimit in our agent?
| Yes time management is your responsibility. The framework does check if you went overtime, but if you do - you lose technically! I recomend you check time before and after relatively heavy calculations and keep enough spare to be on the safe side... |
Must the first block be placed in a corner?
because in the applet provided the first block may be placed anywhere on the board.
| In our version of the game, the first block must be placed in a corner as in our implementation. This is the version you should refer to in the entire assignment. |
What type of assesment for the branching factor do you expect to see in Q5?
| In Q5 the assesment of the branching factor should be represented as a formula. In the formula you are required to define and use simplifying parameters of the state such as the ones exemplified in the question. |
In Q6 what is:
a "rough estimate"?
an "additive/multiplicative magnitude order"?
a "typical game"
|
In question 6, one example of a factor to consider is the number of free corners for your placed shapes. In the begining of the game at least, the branching factor is roughly the value of this parameter times (...something else approximated...) This question aims to define a HEURISTIC method by which a HUMAN may estimate the branching factor relatively fast (say, in less than 30 seconds). The graph should be mainly QUALITATIVE and show the trends in change of the BF over a typical game. A typical game is what ever you define it to be. You may write explicit assumptions you made about this "typical game", it should reflect a game which you may expect to see between two human player with basic common sense and game understanding. At the tail of the graph, a BF of 0 is reasonable, approximately where do you expect this tail to begin? what is the last point for which you may expect the BF is not 0? You may base your answer to this question on example games of you as a human or of your agent. |
How can the agent differentiate between game option 1 and 3?
| There is no clean way to do so with the current implementation. You may use a "hack" to do this, simply check if the timelimit is greater/smaller then 300 (sec). |
BlokusGameInput.makeShapes() does not allow us to create shapes of size 6...
|
You are right. I made a small fix in BlokusGameInput.py: added the following code line after line 17. shapeSizes.append(True) # shapes of size 6 are legal but not mandatory This is the only fix in version 4. |

