Computer Science Canada help with an intro screen |
Author: | babesjersey4 [ Sat Jun 04, 2005 10:12 am ] |
Post subject: | help with an intro screen |
I am creating a game that runs the intro screen has an Input.Pause and then starts the game, the only problem is the background of the intro screen does not clear completely, I have used cls and have reset the background, yet it still does not work, is their anything else I can do? |
Author: | syphon4 [ Sat Jun 04, 2005 11:13 am ] | ||
Post subject: | screen | ||
try drawing a plain white screen over top of the starting one......
|
Author: | lyam_kaskade [ Sat Jun 04, 2005 9:28 pm ] |
Post subject: | |
If you've used cls, there might be a problem with your code. I recommend posting it. |
Author: | babesjersey4 [ Sat Jun 04, 2005 10:15 pm ] | ||
Post subject: | |||
the intro is cheesy but i just want it to work before i brush it up |
Author: | MysticVegeta [ Sun Jun 05, 2005 7:00 am ] |
Post subject: | |
OMG! worst use of processes i have seen, except there were these 2 times but nevermind. The processes are screwing up your cls problem, Why dont you use procedures and try looping them? |
Author: | babesjersey4 [ Sun Jun 05, 2005 9:02 am ] |
Post subject: | |
ok, i'll do that, thanks so much for the advice |
Author: | MysticVegeta [ Sun Jun 05, 2005 10:09 am ] | ||
Post subject: | |||
Try to minimize your process use just for bg music. But now you dont even need process for that, because the built-in function of turing 4.0.5
So use of processes is now really "0" |
Author: | Cervantes [ Sun Jun 05, 2005 10:20 am ] |
Post subject: | |
MysticVegeta wrote: So use of processes is now really "0" Much as I hate the way processes are usually used, I have to disagree with you there. Mckenzie mentioned somewhere sometime ago, processes are just misused. For things such as, in a game of chess, computer AI while waiting for the user's input, processes can be a good thing. But note: the two processes occuring in this type of program do not affect one another. The computer is searching for the best possible move, but that does not affect the code that waits for user input. Likewise, the code that waits for user input does not affect the search for the best possible move(s). Also, this kind of thing cannot really be done without processes. Say your AI uses a particular procedure and lots of recursion. You could not stick that in the same loop as the input loop because the recursion would take quite some time, so the input would not actually be allowed for most of the time. (Plus, you don't want to loop your AI checking!) So, for something like AI for chess, processes may be a good thing. But yes, almost every process used in the Turing section here is misused. |
Author: | MysticVegeta [ Sun Jun 05, 2005 1:36 pm ] |
Post subject: | |
Just a question Cervantes, how much knowledge and practise and work does it take to program a successful chess game with normal level of AI? |
Author: | Cervantes [ Sun Jun 05, 2005 3:35 pm ] |
Post subject: | |
Well, I've never done it myself, but I would say the hardest part would be the AI, for which you'd probably need a strong background in recursion. Plus, you have to be good at chess. |
Author: | c0bra54 [ Sun Jun 05, 2005 3:55 pm ] |
Post subject: | |
yeh.. AI = ew.. however tic tac toe AI = easy.. and checkers i'msure wouldn't be TO hard.... ust chess, you can't program for possible outcomes.. you need to program.. like.. thinking |
Author: | [Gandalf] [ Sun Jun 05, 2005 4:29 pm ] |
Post subject: | |
For chess you use game tree's. You don't program all the possible outcomes, but the program has to calculate the moves. Since there are LOTS of possible moves in chess, to get a good depth search you don't look at all the possibilities, just the likely ones. There are many strategies of making more complex ai's, and Turing is not the best language for it. Yeah... so, it would be nice to have a chess program from Turing. It would probably be slow and all, but it would still be great to have some kind of ai. Somebody did a start once. I remember you could do all the moves and everything, but there was no ai or checkmate/special moves/rules. |
Author: | MysticVegeta [ Sun Jun 05, 2005 6:42 pm ] |
Post subject: | |
well i think one of the points that Cervantes mentioned was pretty good - you have to be good at chess. Thats a good point, i think when Gandalf said "special moves", we need to figure out the special moves first in order to program them, and then check for conditions like - the computer doesnt get beaten up first, the computer still will have place to move, the computer has place to move, etc. Congratz we have programmed 1/100th piece of AI required for normal level chess |
Author: | [Gandalf] [ Sun Jun 05, 2005 7:08 pm ] |
Post subject: | |
Yeah, you have to be decent in chess, true. What I meant with "special moves" was like en passant and castle... For a lot of opening moves and endgame moves there are things called "opening books" and "endgame databases" that just have a bunch of different scenarios for around 4-12 moves so that the beginnings go fast and according to predefined strategies. In the middle, main game where the computer is calculating, it doesn't have to find a "good move". What it usually does is put a value on the different positionings and pieces then try and find a combination of moves which gain it that advantage. I spent a lot of time on chess programming, that's what really introduced my to programming, and I was doing this stuff even before I knew how to program. |
Author: | c0bra54 [ Sun Jun 05, 2005 7:46 pm ] |
Post subject: | |
aaa lol.. i think compsci should like.. try it.. everyone here , like have people, make 3D models, and just render as pictures... and have boards, and everything, and have like a 3 person team on how to make AI research it an everything.. i think this could be pretty crazy... also about pocess's during the opponent (player's) move.. wouldn't that not work right, since the compter wouldn't be taking into account, the move that the player is making.. since if it decided on it's move, before the player moved, then the computer moved.. wouldn't it never take the last move into event.. so wouldn't it be like.. really REALLY easy computer.. since if you put it into check, it doens't know that so it'll just lose...??? |
Author: | [Gandalf] [ Sun Jun 05, 2005 9:19 pm ] |
Post subject: | |
You don't really need 3d models for a good chess program Quote: also about pocess's during the opponent (player's) move.. wouldn't that not work right, since the compter wouldn't be taking into account, the move that the player is making.. since if it decided on it's move, before the player moved, then the computer moved.. wouldn't it never take the last move into event.. so wouldn't it be like.. really REALLY easy computer.. since if you put it into check, it doens't know that Razz so it'll just lose...???
No, the computer would be thinking both during the players move and its own move. Think about it; thinking while the person makes their move is still advantageous, although not as much as during the move. If the ai thinks of a bunch of possibilities while the human is moving then those possibilities are narrowed down when the move is made - so now the computer can focus on those 'branches'. The computer thinks more than one move ahead, just like a good chess player would. It can predict that you will check/checkmate it so it would avoid that outcome. |
Author: | c0bra54 [ Sun Jun 05, 2005 9:40 pm ] |
Post subject: | |
ooo ok.. also i was thiking (while working on other programming hwk :S what about if to do it, you did kinda program for every outcome.. but not really.. like if you said for every piece where can it move, for every spot it can move how many pieces of mine, can get taken, how many pieces can i take.. and those are also not only how many but what.. also it has immediate moves, like if he can take King then Queen, move not ok... and it has it be a certain value ... positive you tkae, negative you don't take, and then it taqkes numbers and branches that do make the grade. then it assumes it did that move, then it says where can the human move... takes those values, and then makes it's final decision, based on not only the highest value, but then also what piece s taking what.. like it's kinda dumb for him to move his bishop if then the player can take his, but a rook (castle) to bishop would be ok, and a knight to bishop perhaps better.. like then instead of checking every branch, it see it's best move, then it finds the worst move the human has comparitivly.. and then decides... ny input (and i dun just wanna goto google and type, how to make chess AI) thx - might seriously consider this and usin a function would be an excellent way to return the value |
Author: | [Gandalf] [ Mon Jun 06, 2005 4:18 pm ] |
Post subject: | |
Well, ya. Most heavy duty chess engines (programs) do some heavy duty calculations. Those calculations being checking the advantages and disadvantages of every move possible. Which is how we get search depth. If the computer is looking ahead towards its next move, then players move, then its move again, that's a search depth of 2. The higher the search depth the better the program will be able to make its decision. What has to be kept in mind is the time that will be spent making the move. The larger the search depth the more possibilities, exponentially, so the longer it will take to make the neccessary calculations. The thing is, to decrease this time you should take into consideration some things which are excluded as soon as they are noticed by the program, obvious "don't go there" situations. The computer doesn't only take the values of the peaces into consideration, it takes positioning, checkmate oppurtunities, control of the center of the board, attack/defend, king safety, and a large number of other variables. The best program has a good balance of each of these. Finally, just as a note of interest. Computers don't "think" like humans do. Humans look at the board, then they immediately dismiss the bad positions, and focus on places where they can develop. Computers on the other hand, are much better at doing brute force calculations, and so they use this method more. It's still surprising that even the best supercomputer chess boxes in the world are about even to the best humans in the world. |
Author: | c0bra54 [ Mon Jun 06, 2005 5:12 pm ] |
Post subject: | |
yeh.. i am still thinking of maybe working on it during the summer, becuase onceyou develop a good system of what the AI will look for, and hwo to tell it what and where everything is, it probly wouldn't be impossible to set one up, and let it take lik 3 or 4 mins / move to a depth of 2 moves... be interresting to see if it would a descent opponent (prolly not.. but still) |
Author: | [Gandalf] [ Mon Jun 06, 2005 5:39 pm ] |
Post subject: | |
Well, that matters... on how well it is coded and optimized. Seeing as how Turing marmolously (yep ) increases requirements for doing things, 2-3 minutes could probably do a depth of 2 or maybe 3, ya. The thing is, well I don't know, but a fairly decent played could crush a program with a depth of 2. Still, if you get it up to 3 maybe it'll be a pretty good challenge. The two best commercial programs in the world go to search depths of 8-12, even 14 sometimes (longer games). |
Author: | c0bra54 [ Mon Jun 06, 2005 9:51 pm ] |
Post subject: | |
yeh.. but this is mainly just for testing, to see what it would be like.. |