From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13717fdb90d942 X-Google-Attributes: gid103376,public From: do_while@ridgecrest.ca.us (Do-While Jones) Subject: Re: Would someone help a struggling ADA student Date: 1998/10/05 Message-ID: <6vaj7d$nht$1@owens.ridgecrest.ca.us>#1/1 X-Deja-AN: 397910647 References: <6v3c4q$890$1@news.campus.mci.net> Organization: RidgeNet - SLIP/PPP Internet, Ridgecrest, CA. (760) 371-3501 Newsgroups: comp.lang.ada Date: 1998-10-05T00:00:00+00:00 List-Id: In article <6v3c4q$890$1@news.campus.mci.net>, Steve wrote: >I have to write an ADA program that plays Battleship. >I have written the basics and it will ramdomly select >"Hit" locations. I now must develop a strategy and write >that code. I would like for the program to be able to "learn" >as it goes. Our programs will be run against other students in >the class and our grade will be based on our win-lose record. >Also, it will be run against the professor's which has never been >beaten. Each program will play each other 20,000x. >I thought of setting up an array and assigning each grid in the 10x10 >board a value then changing each value depending on the outcome of >each shot. Do you have any better suggestions? How should I go about >getting the program to "learn" (other's stragedy) as it plays? >Steve This is one of my pet peeves. Is Steve taking a course in Ada programming, or is it a course in algorithm development, or a course in artificial intelligence? It seems that Steve will be graded on how well he can develop an algorithm to solve the Battleship problem. There doesn't seem to be any reward for program clarity, proper use of Ada features, etc. It would be more appropriate for the professor to give the students a narrative description of a battelship search algorithm and tell the students to write an Ada program that implements that algorithm. The student should be graded on how well he wrote the program, not how good the algorithm is. My comments are based on the assumption that Steve is taking an introductory Ada programming course. If Steve is taking "Creative Problem Solving" or "Artifical Intelligence", and if the course has a prerequisite of at least one Ada programming course, then I have no objections. My fear is that Steve will spend more effort trying to figure out a Battleship algorithm than the syntax of an Ada loop. I'm afraid Steve will get the idea that it is hard to program in Ada because it is hard to figure out how to write a program that learns the game strategy on the fly. Do-While Jones +--------------------------------+ | Know Ada | | [Ada's Portrait] | | Will Travel | | wire do_while@ridgecrest.ca.us | | www.ridgenet.net/~do_while | +--------------------------------+