|
Thanks for ur reply.
Now tell me also the solution. How i'll get the all the process running in another system.
Thanks
Devesh Mishra
|
|
|
|
|
The account your code is running under is not recognized by the remote system. Unless your code is running under an account recognized by BOTH systems, like if both machines were running in a domain environment, you can NOT get the processes of a remote computer.
This has nothing to do with your code, but a lack of understanding about how Windows networking works. If your running the code under your own user account, it means your account doesn't have the appropriate rights to the remote system.
|
|
|
|
|
Hi, I am developing TicTacToe in which i finished working functionlity where 2 people will play.
Now i want to add AI to my game what can be the best algorithm to do that. One more thing any piece of algorithm or any starting code would be very nice.
Now just a real question lets say
Player selected one box. Now its Computer turn. It has 8 possible moves how would you implement that can you give any idea in algorithm shape or Pseudocode please.
I would probably not write code to evaluate each state individually, I'd write a state evaluator that checked for winning moves, blocking moves, and then potential moves based on difficulty.
thanks
|
|
|
|
|
An obvious way is to write a system where it chooses moves randomly or semi randomly ( prefer the middle, then prefer the corners, etc, or whatever you think ) and remembers which moves lead to it winning. Obviously, some basic 'finish the row if I can win this turn' code also makes sense to have.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I dont think you will need much in the line of AI. you could simply calculate all available moves and assign a weight to each move and choose the best one. You could even use some kind of probability to "see ahead" to try to guess what the opponents best moves may be given a certain move.
|
|
|
|
|
there're only 9! (363k) potential games. Brute force is a viable option.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Agreed! Not very elegant but certainly viable.
|
|
|
|
|
I got to the same point a couple of years ago.
As already stated, brute force (check every move possible) is viable in TTT as the number of moves is quite small.
You might also like to read up on AI algo's like AlphaBeta - there is LOADS of reading online about AI.
My head got a bit swallowed up by it all and thats why I never got any further with my TTT game. But I did learn a hell of alot anyway.
|
|
|
|
|
I want to fix the location of form in my application that user could not change its location.
reply soon
|
|
|
|
|
Will the form be maximised ? If not, the best you can do is catch the moving event and move it back.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Or you can make form without border and users won't be able to move it
|
|
|
|
|
I want to create a spooler service (windows Service) which spools the job (which has to executed in time) in message queue.
What will happen if the system crash occurs or the system is restarted.
Is it possible to recover and restart it?
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
you can set the start up type to automatic, you will have to program the recovery yourself because if it crashes in the middle of some work, that work will be lost.
Regards
Shajeel
|
|
|
|
|
|
Thank you very much for you both. I will try the link and I will get back to you if more clarification is necessary.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
I have combobox column in DataGridView.
Up and down error keys should be used to navigate previous and next row in
grid.
For this I override them in ProcessCmdKey() event.
When combobox dropdown menu is open arrow arrow keys should move to previous
and next item in
dropdown menu instead of moving betveen rows.
How to check that combobox dropdown menu is open in ProcessCmdKey() ?
DataGridView ProcessCmdKey() method:
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {<br />
<br />
const int WM_SYSKEYDOWN = 0x104;<br />
<br />
if ((msg.Msg == WM_KEYDOWN) || (msg.Msg == WM_SYSKEYDOWN)) {<br />
switch (keyData) {<br />
case Keys.Down:<br />
if (this.CurrentCell is DataGridViewComboBoxCell) {<br />
CurrentCell = Rows[CurrentCell.RowIndex + <br />
1].Cells[CurrentCell.ColumnIndex];<br />
return true;<br />
}<br />
break;<br />
<br />
case Keys.Up:<br />
if (this.CurrentCell is DataGridViewComboBoxCell) {<br />
CurrentCell = Rows[CurrentCell.RowIndex - <br />
1].Cells[CurrentCell.ColumnIndex];<br />
return true;<br />
}<br />
break;<br />
}<br />
return base.ProcessCmdKey(ref msg, keyData);<br />
}
Andrus
|
|
|
|
|
Can any one pls give me the answers for the following questions.
1) diff b/w for and for each loop??
2) wat is Lock in c#?
3) diff b/w abstract class and interface ?
4) when do we go for abstract class and interface class?
5) diff b/w visual studio 2003 and 2005 ?sql 2000 and 2005?
6) Use of constructor.when and at wat suitation we go for constructor.
I dont want to browse sites and get answers .as v dont cant conclude 4m it.
Thanks in Advance
Bino Varghese
-- modified at 7:33 Friday 1st June, 2007
|
|
|
|
|
Without dwelling on how rude the below statement is,
BINO VARGHESE wrote: I dont want to browse sites and get answers .as v dont cant conclude 4m it.
So how can you conclude from what somebody posts on a forum?
Cheers,
Vıkram.
After all is said and done, much is said and little is done.
|
|
|
|
|
Hey viki come on man take it in the rite spirit....
its all about experience.I personally blve here in Code project all r experienced enough to give me the right answer.Nthg other than tat.
If I was wrong I'm sorry dude....
|
|
|
|
|
BINO VARGHESE wrote: its all about experience.I personally blve here in Code project all r experienced enough to give me the right answer
That's good to know. But in an interview situation the interviewer wants to know about YOUR experience. Not the experience of skilled people that volunteer on internet forums.
|
|
|
|
|
Colin Angus Mackay wrote: in an interview situation the interviewer wants to know about YOUR experience. Not the experience of skilled people that volunteer on internet forums
Well said
|
|
|
|
|
|
Did you get asked these ? What do you think the answers are ? These are very entry level questions, I have to say.
BINO VARGHESE wrote: I dont want to browse sites and get answers
In that case, you'll never be a programmer. Being able to do research is a vital skill
BINO VARGHESE wrote: as v dont cant conclude 4m it.
I have no idea what this means
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yes Im in entry level only ...I'm jst 6 months experienced..
|
|
|
|
|
6 months working with these technologies and you can't answer these very simple questions?
|
|
|
|