Welcome! Log In Create A New Profile

Advanced

Example paper - Solution needed

Posted by Student08 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar Re: Example paper - Solution needed
October 02, 2007 11:19AM
lol.

we all would like a copy of the answers.

 
  ,= ,-_-. =.
 ((_/)o o(\_))
  `-'(. .)`-'
      \_/
http://ilanpillemer.com
Entia non sunt multiplicanda praeter necessitatem
Re: Example paper - Solution needed
October 02, 2007 05:10PM
haha,

Ok my bad, I miss read charlvn's post...

Btw ilanpillemer, thanks for posting that little program the lecturer sent you. Made the whole perceptron learning concept more clear smiling smiley
avatar Re: Example paper - Solution needed
October 02, 2007 08:19PM
I changed it a little; so it was relevant to the question. And the lecturer actually just sent me a link to the program.

Upon later investigation there are a couple of programs on the internet that do it.

 
  ,= ,-_-. =.
 ((_/)o o(\_))
  `-'(. .)`-'
      \_/
http://ilanpillemer.com
Entia non sunt multiplicanda praeter necessitatem
Re: Example paper - Solution needed
October 02, 2007 09:19PM
Ok one thing I noted. Some of you guys are talking about the bias' input as being 1. But if you read on p737 in the textbook you'll see that they note a_0 = -1.

Now I've been working with it as -1 on everything so far and it seems to work. ilanpillemer, in your code there I see that you made the Bias Weight/threshold -1 and the input 1.

If you start on a threshold of 0 as specified in question 1.4 and you use the perception learning function on the bias(W_0) then you would get:

W_0 = W_0 + (T - A) = 0 + (1 - 0) = 1

The two's just turned around so it will still get to the same answer. But I think I'm correct in that the bias' input is always -1.

Feel free to point out if I'm off here, I might just be!
avatar Re: Example paper - Solution needed
October 02, 2007 11:18PM
Didn't quite follow you; but if the bias also gets trained then the network will get trained if the function is linearly seperable. The text book was not clear on the fact the bias also gets trained.

The thing is that depending on what weight you start the bias with a better neural network could result.

For example one that produces the correct answer to < 0 1 1 > and one that does not.

 
  ,= ,-_-. =.
 ((_/)o o(\_))
  `-'(. .)`-'
      \_/
http://ilanpillemer.com
Entia non sunt multiplicanda praeter necessitatem
Re: Example paper - Solution needed
October 03, 2007 01:11PM
ilanpillemer Wrote:
-------------------------------------------------------
> Didn't quite follow you;

I was just commenting on the input of the bias weight, that according to the textbook should be -1. In your code you have it as 1 and the weight as -1. Which I believe should be the other way around. See p.737.

When you work out the weighted sums(just look at the examples in Figure 20.17) you use -1 as the input value for the bias weight.

> but if the bias also gets
> trained then the network will get trained if the
> function is linearly seperable. The text book was
> not clear on the fact the bias also gets trained.

Yes this part in the textbook is unclear. Pity, the rest has been so good thus far.

*edited - was wrong, the bias weight of 0 does result in an answer*

> The thing is that depending on what weight you
> start the bias with a better neural network could
> result.
>
> For example one that produces the correct answer
> to < 0 1 1 > and one that does not.

I hope this was a little bit more clear. Would like to know if the rest of you agree with what I'm thinking smiling smiley
Re: Example paper - Solution needed
October 03, 2007 01:19PM
I've been struggling with the learning algorithms, probably because my brain shuts down when it sees calculus, but it's all fallen into place after reading the C++ code. Thanks!

And thanks for pointing out that the bias needs training, because the example exam works without training the bias I could've been in for a nasty shock if the exam question expects something different.
Re: Example paper - Solution needed
October 03, 2007 05:21PM
The way I see it is that the input(i0) to the bias is always 1.
It cannot be -1 since we are dealing with binary.

Then the bias weight W0 should be -1
Re: Example paper - Solution needed
October 03, 2007 09:24PM
This doesn't have anything to do with binary though. Sure the normal weights are "on" or "off" shown as 1 and 0. But the bias weight is there so the input weights can exceed the threshold and trigger the neuron. So the rule is that:

bias_weight * bias_input < 0

To show this let's take the boolean function perceptrons on p738, let's take the AND.

Suppose only one input is triggered(so AND shouldn't fire),
a_1 = 1 and a_2 = 0 for example,
if we say a_0 = 1 then,

in = W_0*a_0 + W_1*a_1 + w_2*a_2
= 1.5*1 + 1*1 + 1*0
= 1.5 + 1 + 0
= 2.5
So g(in) = 1, since W*x > 0 [see p.740],

this means that AND fires which is not possible since we only gave it one input.

Now if we say a_0 = -1 then

in = W_0*a_0 + W_1*a_1 + w_2*a_2
= 1.5*-1 + 1*1 + 1*0
= -0.5
So g(in) = 0, since W*x <= 0,

this means that AND doesn't fire, like it should.

Basically I found out now it's doesn't matter if the weight or the input of the bias is negative. As long as bias_weight * bias_input < 0
Anonymous User
Re: Example paper - Solution needed
October 06, 2007 10:34AM
Hey guys,

Can someone please email me TUT 103/2007 as I didn't receive it in the post and its not on myunisa, thanks.

my email is brianlr665@webmail.co.za
avatar Re: Example paper - Solution needed
October 06, 2007 10:51AM
Done, although it is available on Osprey....
avatar Re: Example paper - Solution needed
October 06, 2007 12:45PM
From 2006 Tutorial: Additional internet links:

They were using the book by Nils J. Nilsson last year: Artificial Intelligence: A New Synthesis, so they are referencing our AIMA book further down. I didn't check if the links are still valid, hope they are and they can assist.

AI in general:
http://www.faqs.org/faqs/ai-faq/general/part1/preamble.html
http://www.google.com/Top/Computers/Artificial_Intelligence
http://ai-depot.com/Features/Tutorials.html

Neural Networks:
http://www.faqs.org/faqs/ai-faq/neural-nets/part1
http://www.aaai.org/AITopics/html/neural.html

Production systems and Expert Systems (a Production System is a very simple Expert System, where rules are processed on top-down sequence only):
http://www.pcai.com/web/ai_info/pcai_ops.html
http://en.wikipedia.org/wiki/Expert_system

State Machines:
http://en.wikipedia.org/wiki/Finite_state_machine
http://www.nist.gov/dads/HTML/finiteStateMachine.html

Search:
http://cs.gettysburg.edu/%7Etneller/resources/ai-search/uninformed-java/index.html
http://ai-depot.com/LogicGames/MiniMax.html
http://www.cs.ualberta.ca/%7Ejonathan/Courses/657/Notes
http://theory.stanford.edu/%7Eamitp/GameProgramming
http://www.policyalmanac.org/games/aStarTutorial.htm
http://www.geocities.com/jheyesjones/pseudocode.html

Constraint Statisfaction Problems:
http://www.cis.temple.edu/%7Eingargio/cis587/readings/constraints.html
http://aima.cs.berkeley.edu/newchap05.pdf

Logical Agents
http://aima.cs.berkeley.edu/newchap07.pdf

Logic and Refutation Resolution
http://www.cs.wisc.edu/%7Emschultz/cs540/resolution.html
http://www.cs.wisc.edu/%7Edyer/cs540/notes/fopc.html
http://www.cs.wisc.edu/%7Emschultz/cs540/LogicHelp/translationq.html
Re: Example paper - Solution needed
October 06, 2007 06:31PM
While prepping for the exam and after reading the posts in this thread, it seems obvious the exam will be a breeze ...

provided we can email the lecturers, search the web, or find the answers to the exam paper (or at least last years).

Lecturers, will there be wireless coverage in the exam hall ?
avatar Re: Example paper - Solution needed
October 06, 2007 06:48PM
I have some more info:
The example exam paper, is the same as the one's given from 2004 - now (don't know before). But, previous years, in the Nilsson book, full chapter 3 were handling Neural Networks (hence being the first question). We, however, are only handling it in Chapter 20.5. The Nilsson book also explains the formula much more explicitly with examples in a part about Error-Correction procedure.
I've downloaded the tut's from 2004 (end of each year) and have by mistake bought the Nilsson book end of last year before I know the books have been changed. So, I've got a bit more "insight" on where the exam questions comes from and why they are in the order they are given.
Btw - no, I'm not sending out any of the old tuts that I have - I have done that earlier in the year (have mentioned it on a thread that I have it) - I really don't have time to send out emails at this stage.
Good luck to everyone - hope my 2 posts can contribute a little bit...
Reanie
avatar Re: Example paper - Solution needed
October 06, 2007 06:58PM
Oh, the assignment questions from previous years are very similar to the ones we got - they had to answer the 4x queens problem where we got the missionaries. They also got a study guide, but that is probably because Nilsson wasn't that complete with all the defintions. In overall, the example exam paper seems to cover all the stuff that they had assignment questions for - we just missed out on the neural network part because it's later in our book...
Sorry, only registered users may post in this forum.

Click here to login