Thursday, July 28, 2005

True Spirit

26th July 2005 – Mumbai, the financial capital of India was hit by a cyclone and the city witnessed almost 944mm of rainfall in less than 24 hours. The city has suffered serious damage both in life and property; army has been called upon for help. Normalcy will take time.

But what makes me write this blog, it’s the true spirit of Mumbai that the world always talked about and yesterday I witnessed it myself.

A time of disaster in India means extra moneymaking time for the corrupt and taking sadist advantage of the situation, but Mumbai witnessed heroes rise.

The rains was so severe that the Local trains stopped (the heart of Mumbai travel), busses stopped, taxis and auto stopped and most of the personal vehicles lay stranded in more than 10s of kilometers of jam. More than 100 of thousands of people took the roads on foot with more than 4 feet of water.

My office is 32 kilometers from my home and it took me 2 auto rickshaws, 1 taxi ride, 2 truck rides and a 10 km walk to reach home in more than 5 hours. But I consider myself lucky as some had to suffer more.

What failed?

Government failed miserably, I would say India should again go back to the status of under developed country. Mumbai had no disaster management service. People lay stranded for more than 36 hours, 1000s become homeless, 100s died and only thing that one got to hear in media was -

Police blames municipal corporation, municipal corporation blames the fire brigade department, fire brigade department blamed it on the Navy and the cost guard, they in turn blamed it on the failure of the mobile networks.

So you can see this is what we are best at, I am sorry not the people, let me rephrase this

“So you can see this is what are MINISTERS and LEADERS are good at, eating away the money and at time of questioning blame it on each other”. It’s so sad.

What did not fail and will never ever fail?

It’s the people. No one was there except the people and citizens of Mumbai for each other. Shopkeepers served tea and gave free food to the stranded; truck drivers and taxis gave free rides to people, travelers held each other and became support for one another. The true spirit of Mumbai and its people filled up the air.

I will never ever in my life will forget this day, as this day I realized the country is not of its leaders but of its people, a company is not of its bosses but of its employees and instead of me wasting time cursing our corrupt leaders, I should utilize it by helping the needy and praising the Heroes, praising all those unknown faces who came to the rescue with a single motive of serving humanity, god bless them all.

Thursday, July 07, 2005

Rains, Dishes and Dilemmas

Rains have started, water level is going up and so is the number of people falling Ill. I am down with fever and a terrible body ache. I am feeling very restless and i have not felt like this in a long time, I am sure it’s the fever and a very dull weather outside that is contributing a lot to this but I guess there is one more thing which in sub conscious state is adding to the misery.

I am stuck with one of the components of the game. Chef Rastogi

I have completed the Level Editor (more or less), its good enough for me to make levels, save them, load them and re-edit them, so that’s good enough for the time being.

When I started the design work for the Restaurant part of the game, in which the player decides what dish he wants to serve to the AIEaters, I landed in a dilemma. The problem is how can a Chunk of Computer Code figure out whether a Dish it just inputted was tasty enough or not.

A Brief on the Dilemma.

In the game dishes can be made up of a finite number of Ingredients (These are fixed).

Ingredients are divided into the following categories (If required these categories can be changed - but will be fixed for the final game)

  • Non-Veg
  • Vegetables
  • Fruits
  • Spices and Herbs
  • Pulses and Cereals
  • Others (Things like salt, Coffee, Milk, oil etc comes here)
So a dish can be made up of
  • 3 ingredients from Non-Veg category
  • 1 ingredient from vegetable category
  • 0 ingredients from fruit category
  • 4 ingredients from spices and herbs category
  • 1 ingredient from pulses and cereal category
  • 2 ingredients from others category
The name of the dish is a Chicken-Ham-Fish Sizzler with Rice and Potatoes

Sounds yummy

What are the various approaches for a Computer controlled entity - AIEater deciding whether it likes this dish or not?

Theory of Taste: There are in all 5 different kinds of taste buds
  1. Saltiness
  2. Sourness
  3. Sweetness
  4. Bitterness
  5. Umami

My Approach:
Each ingredient has 6 properties
  1. Salt Value [0-1-2-3]
  2. Sour Value [0-1-2-3]
  3. Sweet Value [0-1-2-3]
  4. Bitter Value [0-1-2-3]
  5. SPICE Value [0-1-2-3] (Note the difference here, not take Umami)
  6. Non-Veg or Veg Flag (Boolean)

Each AIEater also has his set of taste values besides his living standards, health, thrill of dinning out etc ,which are not required here)

  1. Salt Value [0-1-2-3]
  2. Sour Value [0-1-2-3]
  3. Sweet Value [0-1-2-3]
  4. Bitter Value [0-1-2-3]
  5. SPICE Value [0-1-2-3] (Note the difference here, not take Umami)
  6. Non-Veg or Veg Flag (Boolean)

Computation of a dish

Ingredient A - 1 2 0 1 3 True
Ingredient B - 1 3 1 1 1 False

if you add the above to make a dish, the dish will have
Dish XYZ - 1 3 1 1 3 True (Higher value is taken; note 1 and 1 does not make the dish (2) twice salty as the proportion of food (Quantity) also increases.

Now AIEater will like this dish if the values match his taste buds (with some variance)

PROBLEM WITH THIS APPROACH:

The taste properties of more than 1 dish can be same, despite of being made up of different ingredients.

Therefore,

Chicken ADD SOYA SAUCE - Taste Good to AI
Chicken ADD ICE-CREAM - ADD Salt - ADD Vinegar - Taste Good to AI

But the later is YUCK!

Phew!

What I am looking for is a more practical and sensible (Making Sense out of a dish) approach for the AIEater to enjoy his food.

PS: AIEater are working on a very simple genetic algorithm (right now)
They are born with a set of taste buds and they evolve their taste buds as the game progress.

Any ideas or random thoughts on this can help me out. Please mail me