Re: Java or C++?

2008-04-14 Thread xakee
On Apr 14, 11:44 am, [EMAIL PROTECTED] wrote:
> Hello, I was hoping to get some opinions on a subject. I've been
> programming Python for almost two years now. Recently I learned Perl,
> but frankly I'm not very comfortable with it. Now I want to move on
> two either Java or C++, but I'm not sure which. Which one do you think
> is a softer transition for a Python programmer? Which one do you think
> will educate me the best?

Well if you need an easier transition, go for java. But personally i
would recommend you to go for C/C++. There are a few very solid
reasons for that.
1. You can still use ur python konwledge, integrate python with you
applications, extend python with C/C++ .. and so on. That would not
only benefit you but the whole community.
2. C/C++ is likely to teach you more things in this transition than
java will. You probably know all the good software engineering stuff
and things like that maybe, (which you can still use in python) but
going to C/C++ you can actually delve into systems programming and
things like that. When you do that, again, you can extend python and
contribute to the community.
3. When you get hold of c/c++, there will be lesser friction in you
forever to transition to  any other language. I appriciate that you
chose python in the first place since that is what i advocate as
well ... the way i see programming should be taught or taken up is
like :
bash/shell scripting -> python/perl -> c/c++ -> assembly  (from
there on, given you give enough time to the end parts, you should not
have any difficulty going to C#/Java/VB/Delphi or whatever for some
nice RAD or even production level performance not-so-critical
applications). So if you're intrested in system programming getting to
know how things get done, have a SOLID computing background and give
python what python gave you, go for C/C++.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Game design : Making computer play

2008-04-14 Thread xakee
On Apr 14, 12:13 pm, v4vijayakumar <[EMAIL PROTECTED]>
wrote:
> In computer based, two player, board games, how to make computer play?
> Are there any formal ways to _teach_ computer, to choose best possible
> move?
>
> I know this is kind of off-topic here. Please redirect me, if there
> are more appropriate newsgroup.
>
> Many thanks.

You should pick up some nice Artificial intelligence book and see for
the game playing section. Most of them have it. Teaching the computer
is almost like telling it all the possibilities. The actual teaching
is telling the computer how to decide which possibility is the best.
That is by using heuristics. All possibilities are normally
represented as trees, one move leading to another. Then there is are
pruning techniques, miny-maxy things where we deal with the concept of
minimizing opponents gain and maximizing your own. So you design
heuristics like that. (For example in the game of tic tac toe, there
can be say 5 moves to be made, and the heuristic function is the
number of moves a given player will win in and the computer
calculates that its 4 for him and 3 for you for a certain move he
will pick the next move with is maybe 3 for him and 4 for you and
execute that move). This is a very simplistic application but this is
how it goes. There are many searching heuristic based algorithms, some
blind search algorithms etc. They are very important in game playing
not just board ones but almost all of them. They are the foundation.
So I would recommend you to open some elementary AI book.
-- 
http://mail.python.org/mailman/listinfo/python-list