Wow… I like…

Rubik’s cube and machine learning

27 October 2009 · 1 Comment

My sister seems like a die-hard-fan of rubik’s cube. I googled about it and found some algorithms to solve it here.

I am interested about implementing PURR-PUSS machine learning algorithm onto this. It would be really interesting to know whether a machine can replicate the same algorithm or perhaps discover some other algorithms. I think, one of the most challenging aspect of PURR-PUSS designer is to design the best associative template for the rubik’s cube.

Should the events are registered as the position of different colours on 3 different face?

How can we represent the associated actions? 1 global action type? or different types of rotational action based on the rotation axes?

Assuming we have perfect event-action type representation, how can we organise the association template? Is a template with current step state of the rubik’s cube associated to a certain action is suffice? Should we consider the past events, because at least 1 previous event can affect the associated action?

For now, this is what I think.

 

Assuming that we have Red Green Blue block on a 3 dimentional 3×3 rubik’s cube, most important information is as following:

———-

| a | b | c |        <- one side with position at {a,b c, …} corresponds to R G B value.

— — —

| d| e | f |

— — —

| g | h | i |

— — —

3 event types:

top[n] := (a,b,c,d,e,f,g,h,i)

left[n] := (a,b,c,d,e,f,g,h,i)

right[n] := (a,b,c,d,e,f,g,h,i)

3 action types:

rotateHorizontalToLeft[n] := (rowPosition, amountOfRotation=1,2,3)

rotateVerticalToUp[n] := (columnPosition, amountOfRotation=1,2,3)

atm, I think following single step association template is suffice:

top[n], left[n], right[n] =>rotateHorizontalToLeft[n] / rotateVerticalToUp[n]

PP will be rewarded when all 3 sides have same colours.

 

based on this, I would optimistically expect PP brain capable of learning the system after a very huge number of simulation. Just to create a LTM map, there’s way too much possibilities in the world. Optimising the LTM path to ensure a reward will be very intensive as the LTM network is very big.

So, I think, would be it possible if we create a mini-reward system whereas the system will be rewarded with mini-reward signal when the association meet one of those induced rubik’s cube algorithms. Then, I might be able to partition the LTM based on the mini-reward nodes. Now, the LTM footprint might be smaller as we  have series of LTMs like LTM[k=1:n].

 

→ 1 CommentCategories: Uncategorized

Section 23 cow protest and New Zealand prison system

18 October 2009 · Leave a Comment

I read 3 news everyday, stuff.co.nz, thestar and berita harian. A news about short film festival fron stuff.co.nz and few google search, somehow leads me to this article Few Muslim inmates but jails buy only halal meat on NZHerald. The main highlight is; NZ prison system provide halal certified meat to all 8500 prisoners in NZ, despite only 82 are Muslims. I’m so impress with their efforts to tolerate and consider the less than 0.01% muslim prisoner population. Another column in NZHerald, however, shows the cow head protest in by Muslim majority Section 23 shah alam residents. Then, I googled this subject and found some youtube clips.

Maybe I have least knowledge about political situation in Selangor, but I really didn’t get it. Why a Hindu temple in Muslim majority is a big problem? I’m sure there got to be another underlying reasons for this accident, but I jsut can’t figure out why.

And 2nd video definitely shows a destructive dialogue session. I think more than 50% of the dialogue content consists of swearing and pathetic cries. What is wrong with you people????!! Why bother having a dialogue session in the first place?? Just to piss off people and do more damage to an already intense situation??

See the ironic here? In New Zealand (minority Muslims), they provide halal meat even to prisons. But in Malaysia (majority Muslims), some of Muslims can’t even tolerate for Hindu temple construction premise and even worse make a totally pathetic protest with cow head. I didn’t see this as religious issue but it is indeed majoriy-vs-minority issue. It’s a shame to see those residents in Section 23 Shah Alam, being majority Muslims, lunatically cried like a bunch of idiots.

I’ve tried to do some research on this. Just curious to know why they’re so angry and QQ like mad dogs in a dialogue session. But most of the vid comments are just totally craps. Some people said education can prevent such accidents. But, I said some people are just being bad because a 7 yo kiddo can behave better than those people.

On a side note, this reminds me about a lecture given by Peter Green during Islam Awareness Week few years back. He mentioned that sometimes it is easier to find Islamic values in non-Islamic communities. I have to agree with him.

→ Leave a CommentCategories: Uncategorized

Turn off screen with face detection

26 September 2009 · Leave a Comment

I have an idea atm, although I won’t be working on this soon enough.

On mac os x (and i’m sure windows too), there’s a feature where you  can automatically turn off your screen using a preset timer. Problem is, I can’t really use a short preset timer. The screen will be turned off while I watch youtube vids. quite annoying.

After watching some EE final year projects, I notice that quite a few ppl (especially those from computer engineering) use intel’s OpenCV library. Basically, it’s a library that provide a bunch of image processing and machine learning resources. THen, I thought, would it be nicer if I can set my screen to be turned off at a shorter time without affecting my works/watching youtubes? The idea is to use iSight and run a facial detection algorithm. I’m 99% sure that I will face to the monitor while watching youtubes. As long as the program can detect any faces, the screen wont go off.

→ Leave a CommentCategories: Uncategorized

Insomnia – It’s happening again

31 July 2009 · Leave a Comment

Been having insomnia problem again this week. I think it’s quite critical. I am tired, but I just can’t sleep. In the morning I get really tired, then I can go to bed and sleep.

This week I tried to follow my doctor’s recommendation, controlling coffee consumption. Doesn’t seem to work atm.

Also, I found a great article about insomnia from stuff.co.nz http://www.stuff.co.nz/life-style/wellbeing/2707742/Ten-percent-tired-but-wired. Apparently,

One thing I found it true, “Spending more time in bed trying to sleep could be counter-productive, Prof Buysse says, while it is also not as simple as removing all stimulants – such as caffeine – from the diet.” Even my Doctor said to take a walk away from bed and do boring stuffs.

Last night, I’ve tried to sleep early and I did. But when I was about to get enough rest, those stupid drunken people got really exited and keep yelling at each other. It’s so damn annoying… WTB more noise control!

→ Leave a CommentCategories: Uncategorized

1010 – 48617A

16 July 2009 · Leave a Comment

Hancur hatiku, mengenang dikau
Menjadi keping keping setelah kau pergi
Tinggalkan kasih sayang
Yang pernah singgah antara kita
Masihkah ada sayang itu….

→ Leave a CommentCategories: Uncategorized

Hardware project #1 doesn’t mean i’m happy with the result

15 July 2009 · Leave a Comment

We had this Wacky car race aka hardware project inspection just now. Our car is damn good. The infrared remote controller works, the Bluetooth works, the camera works, the motor movement was good and the car even have spray and IR jammer. Our team end up being #1. We had a photograph to be featured in one of the uni magazine. But, I’m totally didn’t happy on this project.

Main reason is I didn’t contribute much, which is an important aspect of this assessment. I didn’t satisfy with this. I really am. There are both good and bad reasons for my sh*t contribution. Start with bad reasons and save the good reasons later.

I can simply feel that my knowledge and skills especially on hardware and power electronics is very lacking compared to some people in my team. I didn’t take power electronics so that explains why I’m not good with power electronics (and I didn’t know much about motors too). I feel so bad about it. I know a few about hardware interfacing but I don’t think it’s enough to make sure that the project works. I feel so downzzzz…… Sure I have an idea what going on, but when it comes to real stuffs, they’re more complicated than it seems. I’ve seen some people like myself (didn’t know much). But, I feel those that knows much stuffs is damn pro. Do they have previous experience? Or because they enroll in different courses that helps them know better about stuffs?

I’m not a total idiot. We use simple 8-bit microprocessors and I know how to interface it. When it comes to more advance stuff like interfacing camera, I’m not too sure. In original plan, I’m supposed to work on Bluetooth module, which is fine. I never use Bluetooth tbh and even my phone is cheap nokia1100 with txt-only utility even though I took hardware course. But, I guess I know how it works so I did my job researching what Bluetooth module to use etc. I’ve come out with the most simplest Bluetooth module at a reasonable price. Then I realised that some1 in grp already made the Bluetooth. I was like … WHAT….? it’s never good to ninja somebody else work. Now, what am I supposed to do with my report?

During the break, I’m staying in Christchurch, and I have tome to spend on doing this project. I realised I’m not the key player in this project. I spend most of time doing works at home (my final year project being setup at home machine on osx with Xcode and cbf to run to Uni when you already setup the environment at home). Semester break was never fun, it just means more time need to be spend on doing works. Sometimes I went to uni during the afternoon to checkout if people are doing stuffs (because maybe I can do something). I only meet my team member once tho. FYI, I’m supposed to do some aspect of software, but one guys act made almost all of it when I was just about to start on that and it works very well! Crazy guy. Salut. It’s so bad during the last week of semester break, I realised my final year project went terribly wrong and I start reconstructing the object classes again.

During the end of break, I realised that I’m being left out from the team. I didn’t get email on project updates while other ppl got it. I cbf asking. Maybe it’s indeed my fault for not knowing as much as others. During my last lecture today, I heard one guy said they have someone in their group who didn’t do anything and he report him to the lecturer. Did my team member do that to me? Then, I might expect I will fail this course again. After all, it’s true. All these things, conflicts won’t appears in the report. It’s easier to put a blame on someone who didn’t do works rather than know what actually happens.

But, I’m just writing this blog so that I can release these thoughts from my mind. I need some place to tell this, I guess a blog is not that bad. If I won’t be able to graduate, then it’s over. Period.

I just need to graduate so badly even though I might not be able to do what I want to do in life. So, I didn’t like the idea of working in Petronas. But, that’s a different story. I didn’t like doing Electrical Engineering. The only course I really like in the department is software related courses. I take a glance at Computer Engineering curriculum and I think I like it. However, it’s just too late.

So kids, choose your uni path correctly. Do what you want to do. For example, I like programming and I should do computer science / engineering degree. I also like digital art and I should enroll in multimedia qualifications. I like biology but not medicine, so I should enroll for science degree in biology (even though I’ll miss doing programming, so I think I should go for computer engineering).

Maybe I’m so stressed right now. When you’re stress you’re becoming more dumb.

→ Leave a CommentCategories: Uncategorized

Been a kwhile (yea kwhile)

6 July 2009 · Leave a Comment

I’d like to start with a pantun from R Ramlee film, Nasib Do Re Mi in their folk song Suar Suer Kumoning (wrong spelling I think)

Limau purut lebat di dahan,
Batang selasih condong urannya,
Lapar perut dapat ku tahan,
Hatikah yang kasih apa kah ubatnya.

Today’s post is nothing extraordinaire. Perhaps, I want to share a bit what’s been happening around myself.

I’ve stopped WoW raiding, recently without notice. I just decide to not to log into the realm. I’m not sure what’s happening. It used to be so hard to leave raiding. But, now, it’s like I just feel like I want to quit. I guess all these works has made me subconsciously feel it’s not the right time to spend more time raiding. Not sure what’s gonna happen in the future, I might actually sell my WoW account if I get serious lucrative offer. I’m sure now my account is worth 1k NZD at the very least.

Secondly, barely last week, we didn’t have our welfare food anymore till the end of the year. In which, means that a portion of my allowance will be spend on food. It’s not gonna be easy for me, I have to admit that. I can cook. But, organizing dinner when you’re living alone is not gonna be easy. Luckily nearest china town market sell not just 1, but 2 brand of halal chicken. Basically, they provide everything from bok choi to halal chicken, except halal meat. But, halal chicken is good enough for a walking distance. So, today, I’ve been doing some food preparations for the this week. Chicken was properly cut into smaller portions to fit for a week. Managed to make 4 different dishes for the whole week, I think it wasn’t that bad. One of them is stir-fry and I already enjoy it just now. =D Others were wrapped in aluminum foil for bake. It’s definitely my preferred cooking style. It’s easiest, economical, healthy and most importantly delicious. With properly labelled alunimun foil, I think I might even enjoy my dinner far better than the “welfare food”. It’s like… Hmm today I feel like eating lemon bbq chicken. Get the pack from the fridge, put it into the oven for an hour or so. Cook the rice also with the mutipurpose oven. And lastly dip fresh bok choi into a boiling hot water. And, my dinner is served. Nice and easy.

I’m also enjoying chinese green tea atm. It’s soooo refreshing and very nice. The initial taste is a bit bitter. But, after a while, you can feel the sweetness of the tea leaves. The tricks is to not to use boiling water. Boil the water, put into a cup. Let the temperature goes down a bit. Then brew the tea for about 2 mins while checking Facebook. Ultimate lifestyle…

For me, coffee is my choice when I want a kick start into anything. When u’re into your work, you’ll start to use your brain extensively and you need something to calm yourself. That’s when a cup of relaxing chinese green tea come into play.

→ Leave a CommentCategories: Uncategorized

Things pretty much better…

30 March 2009 · Leave a Comment

Yea, things has been doing better, I guess. My final year project is awesome. Studies in general has been good. My timetable is quite relax, with absolutely 2 days of lectures in a week, which means I can focus on other stuffs on remaining days. The electronic test was damn hard though, but I hope this won’t stop me to finish my studies this year.

I’ve also setup a blog about my final year project at http://purrpuss.wordpress.com/. Besides for my own reference, I’m totally not sure why. Maybe the idea is so cool, a self learning robot that’s able to set its own goal. Maybe because at that time, I’m not that busy and I just want to write something. But, really, whatever…

It’s a bit lonely at my flat so I tends to go out or completely stay in room and do some works.

Btw, I went to earth hour mini concert at Cathedral Square with friends. It was fun. I think mainly because it’s been a while to go to Christchurch CBD during the night. The last kiwi band performance was quite nice. I like it. They’re called The Flip Grater Band.

→ Leave a CommentCategories: Uncategorized

entré challenge

28 March 2009 · Leave a Comment

Should I pursue my idea for 75k challenge? 10k challenge is quite doable with my current timetable. Napkin challenge closing date is close, but where can I get the entry form? Never seen any in Engineering cafe this year. bah…

→ Leave a CommentCategories: Uncategorized

Remind me about Shariah Law…

20 January 2009 · Leave a Comment

I’ve somehow end up reading http://en.wikipedia.org/wiki/Sharia, which reminds me what have been told by Saidina Abu Bakar as-siddiq.

Stop, O people, that I may give you ten rules for your guidance in the battlefield. Do not commit treachery or deviate from the right path. You must not mutilate dead bodies. Neither kill a child, nor a woman, nor an aged man. Bring no harm to the trees, nor burn them with fire, especially those which are fruitful. Slay not any of the enemy’s flock, save for your food. You are likely to pass by people who have devoted their lives to monastic services; leave them alone.

I remember very well from the school. But, that time I didn’t see clearer picture of that says. I think a bit, comparing with what happen in Gaza especially. Something come to my mind. How great Islam is. The greatness of Syariah Law was made a fundemental reference in most modern law such as in US. For example, a person is not guilty unless he/she is proven guilty. Ironically, US administration is also one of the culprits to Zionism. 

A rabbi also says that Muslim and Jews used to live very peacefully. They took care of each other’s children before the uprising of corrupted Zionism ideology. 

→ Leave a CommentCategories: Uncategorized