Showing posts with label Christ University. Show all posts
Showing posts with label Christ University. Show all posts

Sunday, July 12, 2015

Coding the Conway’s Game Of Life

Written by Jonathan Paul (III MCA)
 
It was very hard to understand initially, “What is this Game of Life?”. It seemed so confusing. I was puzzled when Prof. Jibrael Jos first spoke to us about it . But then I read the four simple rules which determined the life of cells; approached sir, and he explained the life of an oscillator (Blinker). I was amazed ! It was like knife going through butter.
    I immediately got down to code it. Few if and else conditions, a little bit of concern for boundary conditions and ensure that no cells in the present generation were affected by cells of next generation ; gave me an ample of joy watching my first species oscillating on the terminal.
Then came the time to tweak the simulation. Sir asked us to discover new species. Just imagining the fact that I might find a new species in the huge ocean of the probabilistic matrix was awe-inspiring.
I wrapped the world of this simulation to allow an infinite space. Also provision for loading of discovered species into the world was given. Existing discoveries of interesting species was included in the simulation.

It was an interesting affair. I could watch these little bots moving on my screen for eternity. It has been an amazing experience coding this. And if you are interested to have fun, join the endeavor of finding new species.
 
 
 
I call this life a Village. It has a glider, blinkers which look like windmills, beehives, blocks which resemble huts, and loaves (food barn). I had fun, hope you do too.

Wiki URL : https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life

 

Wednesday, October 2, 2013

Code Guru: Gateways 2013

Very tight finish for the first 5 places
 

Parth Vora (I)
Samik Banik(II)
Udhay Raj (III) 

Rank 4-10 in order 

Vivian Ambrose,
Tenzin Chemi,
Talat Ahmed ,
Palak Goyal,
Pramod Das, 
Dharmappa Immannavar,
Bharat Lakkur

Congratulations !!!!


      World War Z

50 by 50 array where 
0 is empty 
1 is soldier
2 is Bullet
3 is Mine

       Level 1 Viewer   
               (Show 0 as space and soldiers as #, bullet as | and mine as * )
       Level 2 Set Army (x1,y1,x2,y2)  
       Level 3 March Past ( make a group of soldiers march in different directions N S E W)
       Level 4 Silver Bullet(when soldiers walk into it they die and bullet can kill umlimited no of soldiers)
       Level 5 Land Mine   (when soldiers step on it all around die)
       Level 6 Moving Bouncing Bullet
       Level 7 Armies, Bullets,Mines (support multiple battalions, mines and bullets)

Sunday, September 4, 2011

Code Guru : Gateways 2011





Winners: Jino George (I) , Aditya Gopalkrishnan (II), Raju K (III)

Jino and Aditya were just a few seconds apart and deciding one over the other was nail biting close
Sowmya came fourth. Thanks for all who came and made it a success.
We had MS Computer Science, MCA and M.Sc Computer Science taking part

Questions Were

1. Display Grid 9 by 9
Able to input Food (2 to 9) at any position
Able to input Ant (Type 1 and Type 2) at any position
2. Take Shortest Route to Food
3. Two Ants, First Who reaches takes
4. If food is 4 ants can smell only 4 steps away, if 9 then can smell 9 steps away
5. Ant 2 is mightier than Ant 1. He can grab from Ant 1 if he gets chance
6. Keep walking if smell food, once you get food walk out using shortest path
In following set up (Next Sheet)
Ant goes always to closest food source and moves out using shortest path
Final Level
7. Implement Multiple Food Source and Ants