Friday, September 10, 2010

Semantic behavior of Google Search Engine

Semantic Web...? Let's be dirty from the nutshell. Nothing to freak out. Semantic means meaning of what we mean :). Suppose you want to search a country but you can't remember the name. But of course you know some facts of social, economic and geographical backgrounds. What if you type all the information you already know on google's text area. Will it be able to give you the exact country at once or will it search through every possible combinations and grant you thousands of results in which many are useless for you. Yet google is not that much of brave enough to deal with that kind of semantic mapping procedure as a background thread.

But certainly you may have seen if you type a single word and google it, there are suggestions appears bottom of your result page. Suppose the word is "Srilanka" then you may see a result like below.
Here they have treated the word Srilanka not just as a syntax of a web page but an additional added weight to gain its meaning as it is. Search Engine has been able to identify that Srilanka is a country and hence it is suggesting you to do following related searches also if need, like "srilanka map", "srilanka news" etc. Though you see it every day, did you simply ignore it or didn't want to go further with it or thought as this is also a kind of ordinary query searching methodology.

Of course this is some what like alpha version of semantic SE and this will not appear if it is not just a single word. The issue is, google is pretty much considering about their query retrieving performance and so when it comes to several words underline process complexity goes wild and therefore time consumption gets increasingly high.

How ever there are several semantically semantic search engines. "hakia" is a one such and you can make use of it via www.hakia.com. Hopefully there will be an another rat race of semantic era.

Saturday, August 14, 2010

Sustainable Development #Energy

Today world is facing several critical problems that even the modern technology has also failed to answer perfectly. Growing population of the earth, water and air pollution, running out of fossil fuel etc. But among those most recently discussed aspects were CO2 emission and effects cause to living beans of the earth because of it. We all know co2 emission to the atmosphere increased so rapidly after the industrialization in early 70s. Since then everybody talks about it. but no one cares to take strict actions without hesitations at all.

When it comes to a country like us, of course we have several fall backs and humps towards to the ward sustainable. If I ask what is the key advantage that we have as Sri Lankan's is our position in Asian ocean. We have learnt of it heard of it since our child hoods. But literally doubts are there whether our leaders know that well when we peer in to the actions they should have decided years a go. Thing I want to focus is that we have ocean all around us. We are a tropical country. We have rain forests covering up considerable sand of our land. Wind & Sun rise is of course there. Our holy land is strength enough to grow bio crops too.

I am addressing these issues because in the sense of sustainability, We should give priority to efficient consumption of energy sources and adapt according to melting of those. That means now world is moving towards various kind of re new able energy sources rather than just staying with fossil fuels. One thing is for sure that if demand for the fossil fuel remains as now, there will be a potential risk of world to be in dark. More than 80% of our energy consumption is depending on fuel and one of the coal power station is developing to add up with it. We cant afford for nuclear power plants too. Scientists have found out and even manufactured vehicles those work on re new able energy sources like solar power, wind and even in bio crops like sugar cane. Some local people also have done researches and found out nature friendly vehicles and electronic devices. These innovative and talented creations should have been applied to development process of the country through good hands practically.

Saturday, May 8, 2010

Tips & Tricks to J2ME 3D Gaming...

Here I am going to share some experience that I had to face during my short j2me 3d gaming life. Actually I still do many mistakes while coding and consumes several hours sometimes for to catch them. So It is better for me and those who are new to this field to write down some important points which we all forget to focus or neglect to address.
**important:: you better have some considerable knowledge to understand these points because I am not going to explain them in detail.
1. After loading any image or drawing any object or font do not forget to call flushGraphic(). Otherwise No errors will come but relevant images or objects will not draw on the screen.
2. When using Gaming Canvas there are some restrictions regarding key events of the phone according to the way you call gameCanvas’s super class constructor. That means if you call in your constructor as “super (true) “it tells suppress some key events which calls from your class to it’s super class. If you want to assign events for every key then you have to call as “super (false)”. By default gameCanvas support for gaming keys only.
3. When dealing with sprites, specify their proportions correctly. That means if you are going to specify width and height for the sprite, it should be divided in to equivalent segments.
Ex: Suppose you want 10 by 10 sprites to move and total size of your image is 100 by 10. Then when specifying the width you should give 10 exactly to have 10 equal segments. Otherwise image will not load.
4. Use whatever updating code parts earlier than drawing code parts. Suppose in your game loop you first call draw method which takes care of drawing your stuff on the screen and then you call update method. Update method simply update positions of your objects, handle AI etc. If you call update after the draw function then those updates will apply in the next game loop. Actually it does not add much different to the game. But in some cases like low processing power phones it can be felt if your update method is complicated. So it is just better to use this as a best practice.
5. m3g world that you are going to load in to the phone memory can be a large one. It may contain lot of polygons. So when loading it to the screen and rendering it while in the game play, frames might not be smooth enough or game tends to be slow. So use separate m3g worlds and load them only when need. Try to reduce unwanted polygons in mesh objects as much as you can.
6. If you did load worlds as above you should definitely keep remember to null the unnecessary world objects later. Because you load those worlds and extract their objects and add them to a final one world. After that earlier world objects become use less. Otherwise it adds unwanted weight to the game and in some phones it causes to throw out of memory errors.
7. You load m3g world perfectly according to your code. But when you run it it only displays an empty screen with no errors. This is because some textures of your world might be lost or naming mistakes of images.
8. Reduce far clipping frame of your setPerspective method if you want to add some realistic view to the game such as loading distance objects when you are moving towards them. It also adds a little bit of speed to the game.
9. Use image of alphabet font in which fonts have been packed optimally. Use these fonts for menus, alerts and everything rather than using drawFont method because if you use drawFont, that font size and type may vary according to the phone and may not support as well. But if it is an image of course you can call each font separately and create your own messages.
10. Finally do not apply java’s object oriented concept much more. Because if you have written so many classes for each object then your game loop has to switch back and forth for retrieving objects and calling functions. This leads to consume some performance of the game in limited devices.

Saturday, May 1, 2010

Online Adaptive Game Design

For my 3rd year survey report, i have selected the topic "Adaptive Game Design". So I am doing some researches on it. I would like to share what I got familiar with this field so far as an Introduction (Below is an abstraction of my interim report)


When compare a commercial game with a specific commercial software product both in similar capacity, still publishers or rather companies tend to fear for directly involving for just games. That is why yet only a few leading well-known gaming companies are in the market. It is true that most of the games have indeed a real competitive game play. What developers try to do is make a player centered game which can satisfy its players at best while granting a competitiveness plus joy. AI for games has reached to its top today. Game world has been able to behave like in the real world with help of the advance physic and mathematical functions. Throughout the processes like modeling agents, coding, alpha, beta and game play testing, and making development kits for bugs and modifications, developers often concern for a particular limited group of potential users.

Throughout the history there are so many research papers have been written and have been practically applied for small scale games. Adaptation is a major topic not only in games but biological experiments, outer space explorations, nano evolutionary theory and many other engineering aspects. But what it differs from each field is that what technology optimally suits and in what extent it is going to be applied.

In this paper it is going to be demonstrated that still highly aggressive and competitive game play can be achieved with exceptive efficiency, effectively and robustness with help of dynamically adaptive gaming concepts and technologies. This adaptively can be either learning without human interaction (offline) or learning with human interaction during game play (online) [1]. This paper concerns most about online adaptive game development and its feasibility with current gaming life cycle. Adaptation can be defined as “ability to make appropriate responses to changed or changing circumstances” [2] plus learn from its past mistakes and acting like smart.

When it comes to the player’s role, there can be players those who are really smart thinking and play the game with their own logics. But some takes much time for completing a level and some are aggressive. Each of them has different views to the game and of course implementing a game which is capable of satisfying majority of these groups can be really hard to achieve. But throughout the playing life cycle of the game, modeling each player to a default weight and while in the game play, adjusting this weight to fit with player’s performance regarding the knowledge gathers from online statistics and player head up displays (HUDs) updates, adaptive decision making system can established inside the game.